I got the following code:
- (id)init {
if (self = [super init]) {
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionS
I used the AudioToolbox framework that's why I initialized my audio session as following:
AudioSessionInitialize(NULL, NULL, NULL, NULL);
Here's the rest of my code that I used to configure the audio session. I didn't override the audio route and I also think this is not necessary.
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
OSStatus err = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory,
sizeof(sessionCategory),
&sessionCategory);
AudioSessionSetActive(TRUE);
if (err) {
NSLog(@"AudioSessionSetProperty kAudioSessionProperty_AudioCategory failed: %d", err);
}