Tangerine said:
Can someone tell me how to make a function that returns
the sound frequency recorded by the microphone in the
last moment? I use Dev-C++ and I'm a total newbie if
it's important.
Once you actually work out how to make your implementation
record some audio into a PCM (pulse-code modulation) raw
audio data block, you will want to use some FFT (fast
fourier transforms) to get a signal strength reading for
each frequency, and pick the maximum point.
The implementation specific part should be topical on
comp.os.ms-windows.programmer.win32 or
comp.os.ms-windows.programmer.multimedia
Whereas the domain conversion is a mathematical issue,
could be topical on comp.programming or somewhere like
sci.math
I have just implemented a simple audio recording
program on Cygwin/GCC which should be a similar
environment to your Dev-C++, it was actually very
easy while reading the API documentation.
Source here (121 lines, only two of which contain
a call to a non-standard function):
http://members.optushome.com.au/sbiber/recwave.c