使用 AudioToolbox 按一个按钮后,我会播放此声音。
-(void) onButtonPressSound {
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"m4a"];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath: soundPath], &soundID);
AudioServicesPlaySystemSound (soundID);
}
按下此按钮后,如何让它播放 2 种声音而不是一种,一个接一个?
谢谢,