private void ShutdownDirectSound()
 {
     // Release the primary sound buffer pointer.
     _PrimaryBuffer?.Dispose();
     _PrimaryBuffer = null;
     // Release the direct sound interface pointer.
     _DirectSound?.Dispose();
     _DirectSound = null;
 }
示例#2
0
        public void shutdownAndDispose()
        {
            soundStreamer.shutdown(); // blocks

            soundStreamerThread.Join();

            secondarySoundBuffer.Dispose();
            primarySoundBuffer.Dispose();

            directSound.Dispose();
            directSound = null;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposed && disposing)
            {
                _soundBuffer?.Stop();
                _soundBuffer?.Dispose();

                _primarySoundBuffer?.Dispose();
                _directSound?.Dispose();

                _disposed = true;
            }
        }
 private void ShutdownDirectSound()
 {
     // Release the listener interface.
     _Listener?.Dispose();
     _Listener = null;
     // Release the 3D Secondary Sound Buffer.
     _3DSecondarySoundBuffer?.Dispose();
     _3DSecondarySoundBuffer = null;
     // Release the primary sound buffer pointer.
     _PrimaryBuffer?.Dispose();
     _PrimaryBuffer = null;
     // Release the direct sound interface pointer.
     _DirectSound?.Dispose();
     _DirectSound = null;
 }
示例#5
0
 public void Destroy()
 {
     if (sBuffer != null)
     {
         sBuffer.Dispose();
     }
     if (pBuffer != null)
     {
         pBuffer.Dispose();
     }
     if (device != null)
     {
         device.Dispose();
     }
 }
示例#6
0
        void ShutdownDirectSound()
        {
            // Release the primary sound buffer pointer.
            if (_PrimaryBuffer != null)
            {
                _PrimaryBuffer.Dispose();
                _PrimaryBuffer = null;
            }

            // Release the direct sound interface pointer.
            if (_DirectSound != null)
            {
                _DirectSound.Dispose();
                _DirectSound = null;
            }
        }
示例#7
0
 public static void cleanUp()
 {
     DSBListener.Dispose();
     primaryBuffer.Dispose();
     objDS.Dispose();
 }
示例#8
0
 void ShutdownDirectSound()
 {
     primaryBuffer.Dispose();
     directSound.Dispose();
 }