waveformatex and fillbuffer()



Hi,

I am trying to build a source filter that sends out PCM data with teh
following WAVEFORMATEX struct looks as follows:

WAVESTRUCT fmt;
fmt.wFormatTag = 1; // PCM
fmt.nChannels = 2;
fmt.nSamplesPerSec = 32000;
fmt.nAvgBytesPerSec = 128000;
fmt.nBlockAlign = 4;
fmt.wBitsPerSample = 16;
fmt.cbSize = 0;

When FillBuffer fires for me to fill the buffer with Wav data, I am being
provided with a buffer of size 128KB. Can someone please explain why the
buffer is this size and not 4Bytes (1 samples size) or at least one seconds
worth of buffer space (nBlockAlign*nSamplesPerSec)?

Thanks for any help anyone can give. I cant find antyhing about this
anywhere
James


.



Relevant Pages

  • Re: how to play a smooth streaming audio
    ... > My program will continue receive PCM data from a buffer. ... > that I cannot allow to playback the PCM data smoothly. ... As I know linux support programmer to write PCM data to /dev/dsp, ... > the device will automatically obtain data from the dma buffer of /dev/dsp. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: waveformatex and fillbuffer()
    ... >I am trying to build a source filter that sends out PCM data with teh ... >WAVESTRUCT fmt; ... >provided with a buffer of size 128KB. ... >worth of buffer space? ...
    (microsoft.public.win32.programmer.directx.video)
  • what data is I take from Samplegrabber..?
    ... I take a buffer from Samplegrabber When I render mp3 or wma music source ... this data is bits of full PCM data at that time? ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: what data is I take from Samplegrabber..?
    ... > I take a buffer from Samplegrabber When I render mp3 or wma music source ... I didn't know that this buffer is what?? ... this data is bits of full PCM data at that time? ... Look at the connected format to find out the actual ...
    (microsoft.public.win32.programmer.directx.audio)