How do I still play sound the iphone(ipod touch) is locked but my program is running?
views:
23answers:
2
A:
Depending on how you are playing a sound, setting the audio session type to media player before you start playing sound and before the device is locked may help.
hotpaw2
2010-09-06 18:09:46
A:
[[AVAudioSession sharedInstance] setDelegate: self];
// Use this code instead to allow the app sound to continue to play when the screen is locked. [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil];
chengyan
2010-09-07 02:38:59