gabac
gabac

Reputation: 2078

How to mute an audio stream

Is there way to mute an audio stream or at least control the volume?

cheers

Upvotes: 2

Views: 994

Answers (1)

Frank Shearar
Frank Shearar

Reputation: 17142

If you're using the Audio Queue Services, this is how you adjust the volume:

AudioQueueRef queue = [self yourAQCreationMethod];
OSStatus rc = AudioQueueSetParameter(queue, kAudioQueueParam_Volume, 0);
if (rc) {
  NSLog(@"AudioQueueSetParameter returned %d when setting the volume.\n", rc);
}

Upvotes: 2

Related Questions