void SoundSystem::Resume() { #ifdef __DAVASOUND_AL__ alcProcessContext(context); Deque<SoundChannel*>::iterator it; Deque<SoundChannel*>::iterator itEnd = channelsPool.end(); for(it = channelsPool.begin(); it != itEnd; ++it) { SoundChannel * ch = *it; if(SoundChannel::STATE_PAUSED == ch->GetState()) { ch->Pause(false); } } #endif }
void SoundSystem::Suspend() { Deque<SoundChannel*>::iterator it; Deque<SoundChannel*>::iterator itEnd = channelsPool.end(); for(it = channelsPool.begin(); it != itEnd; ++it) { SoundChannel * ch = *it; if(SoundChannel::STATE_PLAYING == ch->GetState()) { ch->Pause(true); } } #ifdef __DAVASOUND_AL__ alcSuspendContext(context); #endif }