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

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -