2

I have audio constantly playing during my application. I am having some odd behavior when I press the button to return to Springboard then resume my applications. The Audio will continue playing but will skip/cutout every half second or so. Pausing and resuming the audio seems to have no effect.

I am using AVAudioPlayers to play my Audio. Here is the code to play them...

player = [[AVAudioPlayer alloc] initWithData:data error:&err];
[player play];
player.numberOfLoops = loops;

mSimpleSoundList.push_back(player);

Then in the "applicationWillResignActive" I call...

const uint32 size = mSimpleSoundList.size();
for(unsigned int i = 0; i < size; ++i) {

    AVAudioPlayer* curElement = mSimpleSoundList.at(i);
    [curElement pause];
}

followed by this code on restart..

const uint32 size = mSimpleSoundList.size();
for(unsigned int i = 0; i < size; ++i) {

    AVAudioPlayer* curElement = mSimpleSoundList.at(i);
    [curElement play];
}
TurqMage
  • 3,321
  • 2
  • 31
  • 52

1 Answers1

0

Turn out to be an AudioUnits fault.

AudioUnits causing universal skipping after returning from Springboard

Community
  • 1
  • 1
TurqMage
  • 3,321
  • 2
  • 31
  • 52