示例#1
0
 private void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             int num = BassWasapi.BASS_WASAPI_GetDevice();
             if (num != this._device)
             {
                 BassWasapi.BASS_WASAPI_SetDevice(this._device);
             }
             this.RemoveFullDuplex();
             BassWasapi.BASS_WASAPI_Stop(true);
             Bass.Bass.BASS_StreamFree(this._internalMixer);
             this._internalMixer = 0;
             BassWasapi.BASS_WASAPI_Free();
             BassWasapi.BASS_WASAPI_SetDevice(num);
         }
         if (this._outputChannel != 0)
         {
             Bass.Bass.BASS_StreamFree(this._outputChannel);
             this._outputChannel = 0;
         }
         if (this._inputChannel != 0)
         {
             Bass.Bass.BASS_StreamFree(this._inputChannel);
             this._inputChannel = 0;
         }
     }
     this.disposed = true;
 }