//当窗口不激活时,将所有声音静音 VOID CSoundSystemFMod::MuteAll(BOOL bMute) { if(bMute == m_bMuteAll) return; std::list< SOUND_SOURCE >::iterator it; for(it=m_listSoundSource.begin(); it!=m_listSoundSource.end(); it++) { SOUND_SOURCE& sndSource = *it; if(sndSource.pSoundSource && sndSource.pSoundSource->GetFModChannel() >= 0) FSOUND_SetMute(sndSource.pSoundSource->GetFModChannel(), bMute); } m_bMuteAll = bMute; }
void SoundSystem::setMute(bool _mute) { FSOUND_SetMute(FSOUND_ALL, (mute = _mute) ? 1 : 0); }