アプリの起動時に音声を再生したいのですが、まず、音声が再生されません! どのようにコーディングしても。第二に、できればループさせたいです。
@implementation ViewController
-(void)awakeFromNib
{
SystemSoundID soundID;
NSString *soundFile1 = [[NSBundle mainBundle] pathForResource:@"ScaryMusic" ofType:@"mp3"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:soundFile1], &soundID);
AudioServicesPlaySystemSound(soundID);
NSLog(@"Sound Played");
}