Ejemplo n.º 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;
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 6
0
 protected override void PlatformDispose()
 {
     MasterVoice.Dispose();
     Device.Dispose();
 }