コード例 #1
0
 internal void Disconnect()
 {
     if (this.waveOutWindow != null)
     {
         this.waveOutWindow.Close();
         this.waveOutWindow = null;
     }
     if (this.waveOutWindowNative != null)
     {
         this.waveOutWindowNative.ReleaseHandle();
         this.waveOutWindowNative = null;
     }
 }
コード例 #2
0
 internal void Connect(WaveInterop.WaveCallback callback)
 {
     if (this.Strategy == WaveCallbackStrategy.NewWindow)
     {
         this.waveOutWindow = new WaveWindow(callback);
         this.waveOutWindow.CreateControl();
         this.Handle = this.waveOutWindow.Handle;
         return;
     }
     if (this.Strategy == WaveCallbackStrategy.ExistingWindow)
     {
         this.waveOutWindowNative = new WaveWindowNative(callback);
         this.waveOutWindowNative.AssignHandle(this.Handle);
     }
 }