Beispiel #1
0
 /// <summary>
 /// Releases resources held by this WaveBuffer
 /// </summary>
 protected void Dispose(bool disposing)
 {
     if (disposing)
     {
         // free managed resources
     }
     // free unmanaged resources
     if (hHeader.IsAllocated)
     {
         hHeader.Free();
     }
     if (hBuffer.IsAllocated)
     {
         hBuffer.Free();
     }
     if (hThis.IsAllocated)
     {
         hThis.Free();
     }
     if (hWaveOut != IntPtr.Zero)
     {
         lock (waveOutLock)
         {
             WaveInterop.waveOutUnprepareHeader(hWaveOut, header, Marshal.SizeOf(header));
         }
         hWaveOut = IntPtr.Zero;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Releases resources held by this WaveBuffer
 /// </summary>
 // Token: 0x06000BD0 RID: 3024 RVA: 0x000239A8 File Offset: 0x00021BA8
 protected void Dispose(bool disposing)
 {
     if (this.hHeader.IsAllocated)
     {
         this.hHeader.Free();
     }
     if (this.hBuffer.IsAllocated)
     {
         this.hBuffer.Free();
     }
     if (this.hThis.IsAllocated)
     {
         this.hThis.Free();
     }
     if (this.hWaveOut != IntPtr.Zero)
     {
         lock (this.waveOutLock)
         {
             WaveInterop.waveOutUnprepareHeader(this.hWaveOut, this.header, Marshal.SizeOf(this.header));
         }
         this.hWaveOut = IntPtr.Zero;
     }
 }