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.
waveInOpen - All sampling rates are supported?
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.
0 · ·