开发者

AudioServicesPlaySystemSound volume control

I wanted to ask if there is any way to control the volume of the system sou开发者_Go百科nd effect. When I press the volume control toggle (up and down) in the game, the system sound effects does not get affected. I also read that this should be affected by the ringer volume. But the weird thing is that when I press the volume up and down, I do not see the little ringer text on top of the speaker icon. I only see the speaker icon without ringer on top when I press the volume control. Does anyone know why?

Thanks.


If audio is playing on your device using audioQueue, iPod or some other form other than system sounds, the volume adjusted by the side buttons will be the device volume. If the device is otherwise silent, adjusting the side buttons will adjust the ringer volume.


if you want to affected,you can use this

    [[AVAudioSession sharedInstance]
     setCategory:AVAudioSessionCategoryPlayAndRecord
     withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker
     error:nil];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜