Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jules2010

macrumors member
Original poster
Apr 7, 2010
34
0
I've been using the following code to play sounds.
Code:
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID);
AudioServicesPlaySystemSound(soundID);
Which has worked for me, but I've only just noticed that the sound doesn't stop once the user clicks back, to return to my main screen.

I understand from reading here on another thread, that you should only use Audio Services to play small system sounds.

I need to play sounds without using something which shows the player on screen. The sounds need to play instantly without delay.

I want to que sounds up using NSTimer calls, which I have all working, just need to replace the lines above, ideally.

What audio classes / functions should I use ?

TIA
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.