-1

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?

Taryn
  • 242,637
  • 56
  • 362
  • 405
uttam
  • 1,364
  • 4
  • 20
  • 35

1 Answers1

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