Parth Bhatt Parth Bhatt - 1 year ago 105
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


Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download