private void WaitForAllBuffers() { for (WaveOutBuffer waveOutBuffer = this.m_Buffers; waveOutBuffer.NextBuffer != this.m_Buffers; waveOutBuffer = waveOutBuffer.NextBuffer) { waveOutBuffer.WaitFor(); } }
private void WaitForAllBuffers() { WaveOutBuffer Buf = m_Buffers; while (Buf.NextBuffer != m_Buffers) { Buf.WaitFor(); Buf = Buf.NextBuffer; } }
/// <summary>Wait for buffers to release</summary> private void WaitForAllBuffers() { WaveOutBuffer bf = _cBuffers; while (bf._cNextBuffer != _cBuffers) { bf.WaitFor(); bf = bf._cNextBuffer; } }
internal static void WaveOutProc(IntPtr hdrvr, int uMsg, int dwUser, ref WAVEHDR wavhdr, int dwParam2) { if (uMsg == (int)NMWOM.MM_WOM_DONE) { try { GCHandle h = (GCHandle)wavhdr.dwUser; WaveOutBuffer buf = (WaveOutBuffer)h.Target; buf.OnCompleted(); } catch { } } }
private void FreeBuffers() { m_CurrentBuffer = null; if (m_Buffers != null) { WaveOutBuffer First = m_Buffers; m_Buffers = null; WaveOutBuffer Current = First; do { WaveOutBuffer Next = Current.NextBuffer; Current.Dispose(); Current = Next; } while(Current != First); } }
/// <summary>Release buffers</summary> private void FreeBuffers() { _cCurrentBuffer = null; if (_cBuffers != null) { WaveOutBuffer First = _cBuffers; _cBuffers = null; WaveOutBuffer Current = First; do { WaveOutBuffer Next = Current._cNextBuffer; Current.Dispose(); Current = Next; } while (Current != First); } }
private void FreeBuffers() { this.m_CurrentBuffer = (WaveOutBuffer)null; if (this.m_Buffers == null) { return; } WaveOutBuffer buffers = this.m_Buffers; this.m_Buffers = (WaveOutBuffer)null; WaveOutBuffer waveOutBuffer = buffers; do { WaveOutBuffer nextBuffer = waveOutBuffer.NextBuffer; waveOutBuffer.Dispose(); waveOutBuffer = nextBuffer; }while (waveOutBuffer != buffers); }
private void AllocateBuffers(int bufferSize, int bufferCount) { FreeBuffers(); if (bufferCount > 0) { m_Buffers = new WaveOutBuffer(m_WaveOut, bufferSize); WaveOutBuffer Prev = m_Buffers; try { for (int i = 1; i < bufferCount; i++) { WaveOutBuffer Buf = new WaveOutBuffer(m_WaveOut, bufferSize); Prev.NextBuffer = Buf; Prev = Buf; } } finally { Prev.NextBuffer = m_Buffers; } } }
/// <summary>Allocate buffers</summary> /// <param name="bufferSize">buffer size</param> /// <param name="bufferCount">buffer count</param> private void AllocateBuffers(uint bufferSize, uint bufferCount) { FreeBuffers(); if (bufferCount > 0) { _cBuffers = new WaveOutBuffer(_pWaveOut, bufferSize); WaveOutBuffer Prev = _cBuffers; try { for (int i = 1; i < bufferCount; i++) { WaveOutBuffer wbf = new WaveOutBuffer(_pWaveOut, bufferSize); Prev._cNextBuffer = wbf; Prev = wbf; } } finally { Prev._cNextBuffer = _cBuffers; } } }
private void AllocateBuffers(int bufferSize, int bufferCount) { this.FreeBuffers(); if (bufferCount <= 0) { return; } this.m_Buffers = new WaveOutBuffer(this.m_WaveOut, bufferSize); WaveOutBuffer waveOutBuffer1 = this.m_Buffers; try { for (int index = 1; index < bufferCount; ++index) { WaveOutBuffer waveOutBuffer2 = new WaveOutBuffer(this.m_WaveOut, bufferSize); waveOutBuffer1.NextBuffer = waveOutBuffer2; waveOutBuffer1 = waveOutBuffer2; } } finally { waveOutBuffer1.NextBuffer = this.m_Buffers; } }
private void Advance() { m_CurrentBuffer = m_CurrentBuffer == null ? m_Buffers : m_CurrentBuffer.NextBuffer; m_CurrentBuffer.WaitFor(); }
private void Advance() { this.m_CurrentBuffer = this.m_CurrentBuffer == null ? this.m_Buffers : this.m_CurrentBuffer.NextBuffer; this.m_CurrentBuffer.WaitFor(); }
/// <summary>Advance buffer</summary> private void Advance() { _cCurrentBuffer = _cCurrentBuffer == null ? _cBuffers : _cCurrentBuffer._cNextBuffer; _cCurrentBuffer.WaitFor(); }