Пример #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (IsDisposed)
            {
                return;
            }

            if (!MasterVoice.IsDisposed)
            {
                MasterVoice.DestroyVoice();
                MasterVoice.Dispose();
            }

            if (!Mixer.IsDisposed)
            {
                Mixer.StopEngine();
                Mixer.Dispose();
            }

            if (disposing)
            {
                MasterVoice = null;
                Mixer       = null;
            }

            IsDisposed = true;
        }
Пример #2
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;
        }
Пример #3
0
        // Does someone actually need to call this if it only happens when the whole
        // game closes? And if so, who would make the call?
        internal static void Shutdown()
        {
            MasterVoice.DestroyVoice();
            MasterVoice.Dispose();

            Device.StopEngine();
            Device.Dispose();
        }
Пример #4
0
        internal static void PlatformShutdown()
        {
            SoundEffectInstancePool.Shutdown();

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

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

            _device3DDirty = true;
            _speakers      = Speakers.Stereo;
        }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                soundWorld.Clear();

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

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

                _device3DDirty = true;
                _speakers      = Speakers.Stereo;
            }
        }
Пример #6
0
 protected override void PlatformDispose()
 {
     MasterVoice.Dispose();
     Device.Dispose();
 }
Пример #7
0
 private static void PlatformSetMasterVolume()
 {
     MasterVoice.SetVolume(_masterVolume, 0);
 }