示例#1
0
        private void ThreadProc()
        {
            while (!m_ThreadEnd)
            {
                SwitchBuffer();
                m_CurrentBuffer.WaitForData();

                SwitchBuffer();

                if (!m_ThreadEnd)
                {
                    onProcessed(m_CurrentBuffer.Data, m_CurrentBuffer.Size);
                    m_CurrentBuffer.RequestData();
                }
            }
        }
示例#2
0
        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);
        }