objective c - Setting Mac OSX Volume Programatically using XCode -


There aim is no way to set the Mac system volume using C? An output device

  AudioDeviceSetProperty ([[self class kAudioDevicePropertyVolumeScalar] defaultOutputDeviceID], need not zero, // time stamp 0, // Channel 0 Master channel is false, // I Try to use, size (float 32), and volume);  

But it went after OSX 10.6 excluded; Is there a better way to do this? Or I have to compromise for application quantity.

Here is some sample code as your code context allows

  AudioObjectPropertyAddress propertyAddress = {kAudioHardwareServiceDeviceProperty_VirtualMasterVolume, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster}; AudioHardwareServiceSetPropertyData ([self.class defaultOutputDeviceID], and property Akadre, 0, zero, size (float 32), and volume);  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -