waveInOpen - All sampling rates are supported?

Hi Everybody,

I'm trying to play a little with waveIn functions... My goal is to calculate if I'm listening a specified sin frequency or not.

For this reason I'm going down with the samplerate... How can I be sure of the sampling rate set on my device?
If I declare waveFormat.nSamplesPerSec = 9441000; waveInOpen return NO error.. (same if I put 500 Hz) But I'm not really sure that's working (9 MHz!!)...

For example if I want to find a 500Hz sinwave I need to sample at 2000Hz.. (4 times more the searched freq). In this way I should get the 0 / 1 / 0 / -1 sequency but I need to be sure that my audio device is sampling at that samplerate (and not only that my WAVEFORMAT structure is accepted) otherwise my calculations will be wrong.

There's any way to get this data direct from the device?

Thanks for attention.


Sign In or Register to comment.

Howdy, Stranger!

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