systemSoundID crashes my iPad

123 views Asked by At
    SystemSoundID soundID;
    NSString *soundFile = [[NSBundle mainBundle]
                           pathForResource:@"deathsc" ofType:@"mp3"];
    AudioServicesCreateSystemSoundID((__bridge  CFURLRef)
                                     [NSURL fileURLWithPath:soundFile], & soundID);
    AudioServicesPlaySystemSound(soundID);
    }

Whenever I run this bit of code on the simulator, it works perfectly (and sounds terrifying), but when I run it on my iPad, the game freezes and if I touch the screen, I get a sigkill error

0

There are 0 answers