private void ThreadProc() { while (!m_ThreadEnd) { SwitchBuffer(); m_CurrentBuffer.WaitForData(); SwitchBuffer(); if (!m_ThreadEnd) { onProcessed(m_CurrentBuffer.Data, m_CurrentBuffer.Size); m_CurrentBuffer.RequestData(); } } }
private void WaitTilAllDone() { if (m_Buffer.Recording) { m_Buffer.WaitForData(); } WaveInBuffer loCurrentBuffer = m_Buffer.NextBuffer; do { WaveInBuffer loNextBuffer = loCurrentBuffer.NextBuffer; if (loCurrentBuffer.Recording) { loCurrentBuffer.WaitForData(); } loCurrentBuffer = loNextBuffer; } while (loCurrentBuffer != m_Buffer); }