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

ccyork

macrumors newbie
Original poster
Aug 7, 2008
18
0
this is more of an observation than a question. i use the following method to play short sound effects in my game:

-(void) playSound: (id) fileName
{
SystemSoundID soundID;
NSString *soundFile = [[NSBundle mainBundle] pathForResource:fileName ofType:mad:"wav"];
NSURL *url = [NSURL fileURLWithPath:soundFile];
OSStatus error = AudioServicesCreateSystemSoundID( (CFURLRef) url, &soundID );
AudioServicesPlaySystemSound(soundID);

}

interestingly the simulator intermittently gives me an error 1501 without playing the sound. my iPod Touch ALWAYS plays the sound correctly

so if something doesn't seem to work right in the simulator, give it a try on the real device. it just might work
 

meonfire

macrumors newbie
Sep 28, 2008
1
0
Reply

If you take a quick look to the GLPaint demo you will see how easily sounds get implemented with no errors. :D
 

mevdev

macrumors newbie
Dec 26, 2005
1
0
I find the same thing

I've used the EXACT code as in the SysSound and also another demo. I even tried to use the same sound file it didn't work in the simulator. Seemingly every time it still works on my ipod touch.

This is my only issue (well besides the frameworks getting all f'd in the latest sdk).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.