Parth Bhatt Parth Bhatt - 18 days ago 10
iOS Question

How to set volume in AudioQueue without the use of AudioQueueRef?

How to set volume in AudioQueue wthout the use of AudioQueueRef?

I have referef many question regarding this on StackOverflow but all of them use AudioQueueRef object.

Is it possible to do so without use of AudioQueueRef?

Please Suggest

Thanks.

Answer

Try with the previous post. Though the question is different but you can use following code out of that ticked answer. Refer this below code in previous post.

OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);

    if (errorMsg) {
        NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
    }

for above code refer to documentation Controlling the Playback Level

Also refer other answers too. Also I think MPVolumeView is working with AudioQueue so you can use that also.

Comments