Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PSoundChannelDirectSound::SetBuffers ( PINDEX  size,
PINDEX  count 
) [virtual]

Set the internal buffers for the sound channel I/O.

Note that with Linux OSS, the size is always rounded up to the nearest power of two, so 20000 => 32768.

Returns:
TRUE if the sound device is valid for playing/recording.

Reimplemented from PSoundChannel.

Definition at line 735 of file sound_directsound.cxx.

{

  //kept for records
  mBufferCount = count;
  mBufferSize = size; 

  mDXBufferSize = mWFX.nAvgBytesPerSec;

  PTRACE (4, "PSoundChannelDirectSound::SetBuffers ==>  size = " << size << "  |  count = " << count << "  | DXBufferSize = " << mDXBufferSize);
  if (mDirection == Player)
    InitPlaybackBuffer ();
  else
    InitCaptureBuffer ();
  return TRUE;
}

Generated by  Doxygen 1.6.0   Back to index