views:

83

answers:

1

I am using in my application volume setting that when we want we mute volume of my application how this is possible plz tell me with code.

A: 

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