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!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Win32 API waveIn recording issue

george_ageorge_a Posts: 1Member
Hi,

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,
George


Sign In or Register to comment.