Esempio n. 1
0
        public void UnloadData()
        {
            MyLog.Default.WriteLine("MyAudio.UnloadData - START");

            if (m_canPlay)
            {
                m_audioEngine.StopEngine();
                if (m_cueBank != null)
                {
                    m_cueBank.Dispose();
                }
            }

            SoloCue = null;

            DisposeVoices();

            if (m_audioEngine != null)
            {
                m_audioEngine.Dispose();
                m_audioEngine = null;
            }

            m_canPlay = false;

            MyLog.Default.WriteLine("MyAudio.UnloadData - END");
        }
Esempio n. 2
0
        public void UnloadData()
        {
            MyLog.Default.WriteLine("MyAudio.UnloadData - START");

            if (m_3Dsounds != null)
            {
                m_3Dsounds.Clear();
            }

            if (m_canPlay)
            {
                m_audioEngine.StopEngine();
                if (m_cueBank != null)
                {
                    m_cueBank.Dispose();
                }
            }

            SoloCue = null;

            DisposeVoices();
            //Debug.Assert(m_musicCue == null || m_musicCue.Voice == null || m_musicCue.Voice.IsDisposed);
            if (m_audioEngine != null)
            {
                m_audioEngine.CriticalError -= m_audioEngine_CriticalError;
                m_audioEngine.Dispose();
                m_audioEngine = null;
            }

            m_canPlay = false;

            MyLog.Default.WriteLine("MyAudio.UnloadData - END");
        }