AudioServicesPlaySystemSound Volume?

后端 未结 1 414
说谎
说谎 2020-12-08 15:16

I have this code:

-(void)createAndPlaySoundID: (NSString*)name 
{
    NSString *path = [NSString stringWithFormat: @\"%@/%@\", [[NSBundle mainBundle] resourc         


        
相关标签:
1条回答
  • 2020-12-08 15:58

    I was also bit by a similar problem on this topic.

    My problem was that there was a global setting that I was unaware of.

    In the Settings app, under

    General > Sounds > Ringer and Alerts

    If 'Change with Buttons' is set to Off, then sounds using AudioServicesPlaySystemSound() will always be played at full volume (yet other sound API's such as AVAudioPlayer will respect the volume of the device).

    0 讨论(0)
提交回复
热议问题