This is how I played a beep sound effect in iOS 4:
SystemSoundId beepOnSoundId; CFURLRef soundUrl = CFBundleCopyResourceURL( CFBundleGet
This bug report could be related to your question, if you have an AVCaptureSession running.
Under iOS 5, when using an AudioServicesPlaySystemSound call, it will not work when there is an active AVCaptureSession with an audio device active.