internal void Disconnect() { if (waveOutWindow != null) { waveOutWindow.Close(); waveOutWindow = null; } if (waveOutWindowNative != null) { waveOutWindowNative.ReleaseHandle(); waveOutWindowNative = null; } }
internal void Connect(WaveInterop.WaveCallback callback) { if (Strategy == WaveCallbackStrategy.NewWindow) { waveOutWindow = new WaveWindow(callback); waveOutWindow.CreateControl(); Handle = waveOutWindow.Handle; } else if (Strategy == WaveCallbackStrategy.ExistingWindow) { waveOutWindowNative = new WaveWindowNative(callback); waveOutWindowNative.AssignHandle(Handle); } }