I am using in my application volume setting that when we want we mute volume of my application. How this is possible please tell me with code?
Asked
Active
Viewed 418 times
-1
-
Do you mean "How can I mute just my application, or turn the sound off?" or "How can I mute the whole device?" – Colin Pickard Feb 27 '10 at 09:27
1 Answers
0
You can't set the volume of the device programmatically, or the volume of an Audio Session.
You can't set the volume of an application as such, but you can set the volume of an Audio Queue.
AudioQueueRef queue;
OSSstatus rc = AudioQueueSetParameter(yourQueue, kAudioQueueParam_Volume, 0);
if (rc) {
NSLog(@"Something went wrong muting the audio queue. Return code: %d", rc);
}
More info here: http://developer.apple.com/mac/library/documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html

Frank Shearar
- 17,012
- 8
- 67
- 94