在.h中:
#import <AudioToolbox/AudioToolbox.h>
@interface ViewController : UIViewController {
SystemSoundID beatAudio;
}
米:
//File path already created
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path], &(beatAudio));
AudioServicesPlaySystemSound(beatAudio);
声音很完美,但是当我上下切换音量条时,这个声音的音量不受影响。有什么解决办法吗?