private void TestLength() { int l; m_pSample.SetLength(12); m_pSample.GetLength(out l); Debug.Assert(l == 12); m_pSample.GetMaxLength(out l); Debug.Assert(l == MAXLENGTH); }
public void AllocateForOutput(int dwOutputNum, int cbBuffer, out INSSBuffer ppBuffer, IntPtr pvContext) { int i; lock (this) { i = m_UseNext; m_UseNext = (m_UseNext + 1) % MAXBUFFERS; } ppBuffer = m_InsBuf[i]; while (!m_InsBuf[i].IsBufferFree()) { Thread.Sleep(1); } ppBuffer.SetLength(cbBuffer); }