Hi guys,
I use CDAudioManager to play a background music and various sounds. When the "pause" button is pressed, I stop all sounds but I keep the music playing.
I noticed that when my app is running on iOS5, background music gets LOUDER when effects stop. When the pause menu is dissmissed (and thus sounds return), music gets QUIET again. The more sounds I have, the more noticeable the volume drop is. This happens on iPhone4 running iOS5, but doesn't happen neither on iPad2 nor iPhone 3G both running iOS4.
This is how I play audio (nothing fancy here):
CDAudioManager* manager = [CDAudioManager sharedManager];
if( ![manager isBackgroundMusicPlaying] ) {
[manager playBackgroundMusic: @"background_music.mp3" loop: YES];
}
[[CDAudioManager sharedManager].soundEngine playSound: SOME_EFFECT_ID sourceGroupId:CGROUP_EFFECTS pitch:1.0f pan:0.0f gain: 1.0f loop:NO]
Also, on startup, I use CDSoundEngine to create separate channel for sounds:
CDSoundEngine *sse = [CDAudioManager sharedManager].soundEngine;
NSArray *sourceGroups = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:31], nil];
[sse defineSourceGroups:sourceGroups];
[CDAudioManager initAsynchronously:kAMM_FxPlusMusicIfNoOtherAudio];
Any ideas?