public void Dispose() { //#if DEBUG // if (m_voicePools != null) // { // foreach (MySourceVoicePool voicePool in m_voicePools.Values) // { // MySandboxGame.Log.WriteLine(voicePool.ToString()); // } // } //#endif //DEBUG if (m_waveBank != null) { m_waveBank.Dispose(); } if (m_reverb != null) { m_reverb.Dispose(); } m_reverb = null; foreach (var vp in m_voicePools) { // eventual stopping of playing vp.Value.StopAll(); } foreach (var vp in m_voicePools) { vp.Value.Dispose(); } m_voicePools.Clear(); m_cues.Clear(); }
public void Dispose() { //#if DEBUG // if (m_voicePools != null) // { // foreach (MySourceVoicePool voicePool in m_voicePools.Values) // { // MySandboxGame.Log.WriteLine(voicePool.ToString()); // } // } //#endif //DEBUG if (m_waveBank != null) { m_waveBank.Dispose(); } if (m_reverb != null) { m_reverb.Dispose(); } }