I need a C++ code, compilable in Visual Studio, that grabs the sound from the USB microphone and stores the last several seconds of it in a buffer.
I need a C++ code, compilable in Visual Studio, that grabs the sound from the USB microphone and stores the last several seconds in a buffer.
More specifically. A noise/sound slider should be present, which controls the sound intensity below which it's considered silence and above which it's considered legitimate sound.
It should perform some very simple analysis of the sound:
TO PUT IT SIMPLY: if i speak "sh" or "f" or any other noise into the microphone it should show 1, if i speak "sh sh" it should show 2, if i speak "sh sh sh" it should show 3 etc.
TO PUT IT MORE PRECISELY:
At any moment in time, if there has been >=1.1 seconds of silence, the program should store in its buffer the history of the sound intensity level since the last time there was >=1.1 seconds of silence. And it should display on the screen the number of "sound bursts" that have occurred within that period of time. A "sound burst" means that the volume level has exceeded the noise/sound cutoff for at least [url removed, login to view] seconds.