0

I have an app that should play 3 distinct sounds and I define them as so in my ViewDidLoad:

AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"2357_02" ofType:@"m4a"]], &addedSound);
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"2357_01" ofType:@"m4a"]], &updatedSound);
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"notifier_12" ofType:@"m4a"]], &notFoundSound);

And I cue them to play like so:

AudioServicesPlaySystemSound(addedSound);

They play in the simulator but not on the ipad? In my Build Phases under Copy Bundle Resources I see them listed so I assumed that they should make it as part of my app - what am I missing here?

Slee
  • 27,498
  • 52
  • 145
  • 243
  • Hate to state the obvious, but you're sure the device isn't set to mute? It's a silly thing but I forget to check it once and pounded my head for a few minutes... – isaac Oct 05 '11 at 23:11
  • Dupe? Is your sound too long: http://stackoverflow.com/questions/2014578/sound-on-simulator-but-not-device – Andrew Johnson Oct 05 '11 at 23:40

1 Answers1

0

I actually used the solution suggested by Tammenn on this question and it worked great for me: Sound on simulator but not device

Community
  • 1
  • 1
Slee
  • 27,498
  • 52
  • 145
  • 243