Skip to content

br0kenpixel/coreaudio_volctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreAudio - Volume Control

A simple library for setting/getting mute state and volume level on macOS.

Example

use coreaudio_volctl::AudioOutputDevice;

fn main() {
    let dev = AudioOutputDevice::get_default().unwrap();
    println!("{dev:?}");

    println!("Volume: {}%", dev.get_volume().unwrap());
    println!("Muted: {}", dev.is_muted().unwrap());
}

Compatible OSs

Currently it's been tested only on macOS Monterey 12.6.5 (21G531). However, it should work on older versions down to Big Sur. It may not compile on macOS Catalina and older due to some API changes in CoreAudio.

About

Library for controlling mute/volume on macOS.

Topics

Resources

License

Stars

Watchers

Forks

Languages