private void ShutdownDirectSound() { // Release the primary sound buffer pointer. _PrimaryBuffer?.Dispose(); _PrimaryBuffer = null; // Release the direct sound interface pointer. _DirectSound?.Dispose(); _DirectSound = null; }
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; }
public void Destroy() { if (sBuffer != null) { sBuffer.Dispose(); } if (pBuffer != null) { pBuffer.Dispose(); } if (device != null) { device.Dispose(); } }
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; } }
public static void cleanUp() { DSBListener.Dispose(); primaryBuffer.Dispose(); objDS.Dispose(); }
void ShutdownDirectSound() { primaryBuffer.Dispose(); directSound.Dispose(); }