You do not need. With the Audio Session, you can decide how the sound should behave.
From the Audio Programming Guide :
With the audio session interface, you specify aspects of your sound applications and set it to live harmoniously in the iPhone sound environment. You start by asking questions such as:
Do you want your sound to be muted by the Ring / Silent switch? The answer is probably yes if the sound does not matter to use your application successfully. (Users value the ability to run your game in a meeting with anyone wiser.)
Do you want iPod audio to continue playing when your sound starts? It can be a virtual piano, allowing users to play along with songs in their libraries. You want iPod audio to stop, however, for a streaming radio application.
You probably want:
UInt32 sessionCategory = kAudioSessionCategory_SoloAmbientSound; AudioSessionSetProperty ( kAudioSessionProperty_AudioCategory, sizeof (sessionCategory), &sessionCategory );
For more types of behavior, browse through the categories of audio messages or read the entire Audio Programming Guide .
Kriem
source share