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 But it went after OSX 10.6 excluded; Is there a better way to do this? Or I have to compromise for application quantity.
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);
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
Post a Comment