I\'ve got code that looks like this:
for (std::list- ::iterator i=items.begin();i!=items.end();i++)
{
bool isActive = (*i)->update();
/
I think you have a bug there, I code this way:
for (std::list::iterator itAudioChannel = audioChannels.begin();
itAudioChannel != audioChannels.end(); )
{
CAudioChannel *audioChannel = *itAudioChannel;
std::list::iterator itCurrentAudioChannel = itAudioChannel;
itAudioChannel++;
if (audioChannel->destroyMe)
{
audioChannels.erase(itCurrentAudioChannel);
delete audioChannel;
continue;
}
audioChannel->Mix(outBuffer, numSamples);
}