Win32 API waveIn recording issue - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Win32 API waveIn recording issue

george_ageorge_a Posts: 1Member

I am having some difficulty comprehending the result of the Win32API waveIn.

As you know, to receive the input from the microphone , you have to call waveInOpen, waveInStart and to add some buffers in the queue.
When the buffer is filled , the appropriate callback function is called.

I tried in my program to see how often the function is called compared to the number of seconds passed.

The WaveFormatEx I specified was 8192 samples , 16 bits and 1 channel . The buffer's length was 8192 bytes. Therefore , I expected that the callback function be called twice / second , bringing 4096 samples each time.
However , I discovered that the function was called about 3.1 times / second, which is weird.

Any idea why this might happen?
What does the other data mean? Must it be taken in account when doing the Fourier analysis?

Thanks a lot,

Sign In or Register to comment.