/// <summary> /// Dispose IDisposable members. /// </summary> public void Dispose() { GC.SuppressFinalize(this); _audioEngine.Dispose(); _waveBank.Dispose(); _soundBank.Dispose(); }
/// <summary> /// Clean up the component when it is disposing. /// </summary> protected override void Dispose(bool disposing) { try { if (disposing) { if (soundBank != null) { soundBank.Dispose(); soundBank = null; } if (waveBank != null) { waveBank.Dispose(); waveBank = null; } if (audioEngine != null) { audioEngine.Dispose(); audioEngine = null; } } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { try { if (disposing) { if (_aSoundBank != null) { _aSoundBank.Dispose(); _aSoundBank = null; } if (_seWaveBank != null) { _seWaveBank.Dispose(); _seWaveBank = null; } if (_bgmWaveBank != null) { _bgmWaveBank.Dispose(); _bgmWaveBank = null; } if (_audioEngine != null) { _audioEngine.Dispose(); _audioEngine = null; } } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { #if (STEAM && WINDOWS) steam.Shutdown(); #endif //clean up. if (FrameworkCore.graphics.GraphicsDevice != null) { FrameworkCore.graphics.GraphicsDevice.Dispose(); } audiomanager.ClearAll(); if (soundbank != null) { soundbank.Dispose(); } if (waveBank != null) { waveBank.Dispose(); } if (audioEngine != null) { audioEngine.Dispose(); } base.Dispose(disposing); }
/// <summary> /// Disposes of all of the music. /// </summary> public void Dispose(bool finalize) { if (PlayingAnything()) { StopAll(); } if (audioEngine != null) { audioEngine.Dispose(); audioEngine = null; } if (soundBank != null) { soundBank.Dispose(); soundBank = null; } if (waveBank != null) { waveBank.Dispose(); waveBank = null; } }
/// <summary> /// Clean up the component when it is disposing. /// </summary> protected override void Dispose(bool disposing) { try { if (disposing) { StopMusic(); if (sounds != null) { sounds.Dispose(); sounds = null; } if (waves != null) { waves.Dispose(); waves = null; } if (engine != null) { engine.Dispose(); engine = null; } } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { if (disposing) { _screenManager.Dispose(); _console.Dispose(); _consoleLoggerTarget.Dispose(); _inputManager.Dispose(); if (_spriteBatch != null) { _spriteBatch.Dispose(); } if (_audioEngine != null) { _audioEngine.Dispose(); } if (_waveBank != null) { _waveBank.Dispose(); } if (_soundBank != null) { _soundBank.Dispose(); } } base.Dispose(disposing); }
} // Dispose(someObject) /// <summary> /// Dispose /// </summary> /// <param name="someObject">Some object</param> public static void Dispose(ref WaveBank someObject) { if (someObject != null) { someObject.Dispose(); } someObject = null; } // Dispose(someObject)
public static void Unload() { if (!Loaded) { return; } soundBank.Dispose(); waveBank.Dispose(); audioEngine.Dispose(); }
protected override void Dispose(bool disposing) { try { if (disposing) { SoundBank.Dispose(); WaveBank.Dispose(); Engine.Dispose(); } } finally { base.Dispose(disposing); } }
/// <summary> /// Unloads the sound bank and the wave bank which are currently loaded /// to make room for a new one or just to shut down. /// </summary> protected void UnloadBank() { if (m_soundBank != null) { m_soundBank.Dispose(); m_soundBank = null; } if (m_waveBank != null) { m_waveBank.Dispose(); m_waveBank = null; } }
//* ────________________________________* //* methods ───────────────────────────────-* //* -----------------------------------------------------------------------* /// <summary> /// アンマネージ リソースの解放およびリセットに関連付けられている /// アプリケーション定義のタスクを実行します。 /// </summary> public void Dispose() { CLogger.add("音響リソースの解放をしています..."); string strErr = ""; try { if (cueBGM != null) { cueBGM.Dispose(); } } catch (Exception e) { strErr += e.ToString() + "\r\n"; } try { if (soundBank != null) { soundBank.Dispose(); } } catch (Exception e) { strErr += e.ToString() + "\r\n"; } try { if (waveBankBGM != null) { waveBankBGM.Dispose(); } } catch (Exception e) { strErr += e.ToString() + "\r\n"; } try { if (waveBankSE != null) { waveBankSE.Dispose(); } } catch (Exception e) { strErr += e.ToString() + "\r\n"; } try { if (engine != null) { engine.Dispose(); } } catch (Exception e) { strErr += e.ToString() + "\r\n"; } if (strErr.Length > 0) { CLogger.add( "音響処理の解放に失敗しました。" + Environment.NewLine + "完全に終了しないうちにウィンドウを非アクティブにするとこの現象が起きやすいです。" + Environment.NewLine + Environment.NewLine + strErr); } soundBank = null; cueBGM = null; waveBankBGM = null; waveBankSE = null; engine = null; CLogger.add("音響リソースの解放完了。"); }
protected override void Dispose(bool disposing) { soundBank.Dispose(); waveBank.Dispose(); engine.Dispose(); playList = null; currentlyPlaying = null; cues = null; soundBank = null; waveBank = null; engine = null; base.Dispose(disposing); }
/// <summary> /// Shuts down the sound code tidily /// </summary> public void Shutdown() { if (soundbank != null) { soundbank.Dispose(); } if (wavebank != null) { wavebank.Dispose(); } if (engine != null) { engine.Dispose(); } }
/// <summary> /// stops every sound and removes every sound member. /// </summary> public void Dispose() { if (soundOn == false) { return; } StopSound(); audioCategories.Clear(); SoundBank.Dispose(); WaveBank.Dispose(); AudioEngine.Dispose(); }
public void WaveBankCtor() { Assert.Throws <ArgumentNullException>(() => new WaveBank(null, null)); Assert.Throws <ArgumentNullException>(() => new WaveBank(_audioEngine, null)); Assert.Throws <ArgumentNullException>(() => new WaveBank(_audioEngine, "")); //Assert.Throws<DirectoryNotFoundException>(() => new WaveBank(_audioEngine, @"This\Does\Not\Exist.xwb")); Assert.Throws <FileNotFoundException>(() => new WaveBank(_audioEngine, @"Assets\Audio\Win\NotTheFile.xwb")); var waveBank = new WaveBank(_audioEngine, @"Assets\Audio\Win\Tests.xwb"); Assert.False(waveBank.IsInUse); Assert.False(waveBank.IsDisposed); Assert.True(waveBank.IsPrepared); waveBank.Dispose(); Assert.True(waveBank.IsDisposed); Assert.False(waveBank.IsInUse); Assert.False(waveBank.IsPrepared); }
/// <summary> /// Removes a wave bank /// </summary> /// <param name="waveBankFile">The wave bank to remove</param> #endregion public static void RemoveWaveBank(string waveBankFile) { if (mXnaWaveBanks.ContainsKey(waveBankFile)) { WaveBank wb = mXnaWaveBanks[waveBankFile]; mXnaWaveBanks.Remove(waveBankFile); wb.Dispose(); if (mDefaultWaveBank == waveBankFile) { if (mXnaWaveBanks.Count > 0) { mDefaultWaveBank = mXnaWaveBanks.Keys.GetEnumerator().Current; } else { mDefaultWaveBank = string.Empty; } } } }
/// <summary> /// Garbage collection. /// </summary> protected override void Dispose(bool disposing) { try { if (disposing) { if (_MusicCue1 != null) { _MusicCue1.Dispose(); _MusicCue1 = null; } if (_MusicCue2 != null) { _MusicCue2.Dispose(); _MusicCue2 = null; } if (_SoundBank != null) { _SoundBank.Dispose(); _SoundBank = null; } if (_WaveBank != null) { _WaveBank.Dispose(); _WaveBank = null; } if (_AudioEngine != null) { _AudioEngine.Dispose(); _AudioEngine = null; } } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { if (!disposed && disposing) { //Save the settings Settings.Default.Save(); //Do the disposing if (m_currentMusic != null) { m_currentMusic.Dispose(); } m_musicCategory = new AudioCategory(); m_soundCategory = new AudioCategory(); m_engine.Dispose(); m_waveBank.Dispose(); m_soundBank.Dispose(); disposed = true; } }
/// <summary> /// Shuts down the sound code tidily /// </summary> public void shutdown() { _soundBank.Dispose(); _waveBank.Dispose(); _engine.Dispose(); }
public void TearDown() { _soundBank.Dispose(); _waveBank.Dispose(); _audioEngine.Dispose(); }
public static void Shutdown() { soundbank.Dispose(); wavebank.Dispose(); engine.Dispose(); }
public void Shutdown() { waveBank.Dispose(); soundBank.Dispose(); audioEngine.Dispose(); }
/// <summary> /// Shuts down the sound code tidily /// </summary> public void Shutdown() { _soundbank.Dispose(); _wavebank.Dispose(); _engine.Dispose(); }
/** @fn void CleanUp() * @brief clean up the XACT objects */ public void CleanUp() { m_audioEngine.Dispose(); m_soundBank.Dispose(); m_waveBank.Dispose(); }
public void Dispose() { audioEngine.Dispose(); soundBank.Dispose(); waveBank.Dispose(); }