开发者

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

开发者 https://www.devze.com 2023-04-04 14:20 出处:网络
How to set volume in AudioQueue wthout the use of AudioQueueRef? I have refered many ques开发者_运维百科tion regarding this on Stack Overflow but all of them use AudioQueueRef object.

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

I have refered many ques开发者_运维百科tion regarding this on Stack Overflow but all of them use AudioQueueRef object.

Is it possible to do so without use of AudioQueueRef?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消