开发者

system sound services works on simulator but not on the iPad

开发者 https://www.devze.com 2023-03-23 11:34 出处:网络
- (void)viewDidLoad { SystemSoundID ReelStopSound; NSStri开发者_JAVA百科ng *soundPath = [[NSBundle mainBundle] pathForResource:@\"spin\" ofType:@\"mp3\" ];
- (void)viewDidLoad {

SystemSoundID ReelStopSound;
NSStri开发者_JAVA百科ng *soundPath = [[NSBundle mainBundle] pathForResource:@"spin" ofType:@"mp3" ];
CFURLRef soundURL = (CFURLRef)[NSURL fileURLWithPath:soundPath];
AudioServicesCreateSystemSoundID(soundURL, &ReelStopSound);
AudioServicesPlaySystemSound(ReelStopSound);    
[super viewDidLoad];
}

when i run this app in simulator it plays the spin.mp3 but in the my iPad its not!!

0

精彩评论

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