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