0

in .h:

#import <AudioToolbox/AudioToolbox.h>
@interface ViewController : UIViewController {
    SystemSoundID beatAudio;
}

in.m:

//File path already created
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path], &(beatAudio));
AudioServicesPlaySystemSound(beatAudio);

The sound is perfect, but when I toggle up and down the volume bar, the volume of this sound is not affected. Any solutions?

Ben Lu
  • 2,982
  • 4
  • 31
  • 54

1 Answers1

3

You've created it as a system sound, and in order for them to be affected by the volume control, you have to change the phone settings

Go into settings->sounds and select 'Change with Buttons' to on.

You may not need to play this sound as a system sound though ?

grahaminn
  • 1,557
  • 1
  • 10
  • 10