BUG in OpenNETCF.Multimedia.Audio.Recorder.RecordFor and OpenNETCF.Multimedia.Audio.Player function

  • Thread starter Thread starter xucheng
  • Start date Start date
X

xucheng

1, To fix RecordFor BUG , change code to :

m_recBufferSize = (int)(Math.Min( (int)Seconds, BufferLen ) *
m_recformat.AvgBytesPerSec);

// for ( int i = 0; i < 2; i ++ )
// {
WaveHeader hdr = GetNewRecordBuffer( m_recBufferSize );

// send the buffer to the device
CheckWaveError(Core.waveInAddBuffer(m_hWaveIn, hdr.Header,
hdr.HeaderLength));
// }


2, To fix Player BUG , change code to :

private void RefillPlayBuffers()
{
while( m_qBuffers.Count < MaxBuffers )
{
int cb = (int)(BufferLen * m_format.AvgBytesPerSec);

.......
}
 
Back
Top