views:

35

answers:

1

The following code plays well on the simulator but the audio doesnt play on the actual device. I have tries aif, wav and mp3 ... all three with the same behaviour. Please sugest what could be wrong.

SystemSoundID aSound;
AudioServicesCreateSystemSoundID(CFBundleCopyResourceURL(CFBundleGetMainBundle(),CFSTR("drop"), CFSTR("wav"), NULL), &aSound);
AudioServicesPlaySystemSound(aSound);
A: 

Damn! I realized that for some reason, no app in my device was playing an audio! Reboot worked.