Example #1
0
        internal static void PlatformShutdown()
        {
            if (_reverbVoice != null)
            {
                _reverbVoice.DestroyVoice();
                _reverbVoice.Dispose();
                _reverbVoice = null;
            }

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

            if (Device != null)
            {
                Device.StopEngine();
                Device.Dispose();
                Device = null;
            }

            _device3DDirty = true;
            _speakers      = Speakers.Stereo;
        }
Example #2
0
        private void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    StopFxSounds();
                    StopEnvSounds();

                    _currentBgm?.DestroyVoice();
                    _currentBgm?.Dispose();
                    _currentBgm = null;

                    _fxLinkedSoundList.Clear();
                    _envLinkedSoundList.Clear();

                    UnloadAll();

                    _fxSubmixVoice.DestroyVoice();
                    _fxSubmixVoice.Dispose();

                    _envSubmixVoice.DestroyVoice();
                    _envSubmixVoice.Dispose();

                    _masteringVoice.DestroyVoice();
                    _masteringVoice.Dispose();

                    _xAudio2.Dispose();
                }

                _disposed = true;
            }
        }
Example #3
0
        private void DisposeVoices()
        {
            if (m_hudAudioVoice != null)
            {
                m_hudAudioVoice.Dispose();
            }

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

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

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