Getting sound amplitude of a given input/ouput

Mar 2, 2016 at 8:34pm
Hello,

According to this thread:
http://stackoverflow.com/questions/2445756/how-can-i-calculate-audio-db-level
you can get the amplitude which is related to noise level. I want to know how to get the actual information of the sound inpout/ouput. For exemple, how to get the amplitude of the music playing from my speaker ?

I thought I could get into the audacity open source, integrate it to my program so it would record real time input/output sound and I would be able to find the amplitude and work arround with.

Is there a better (easier) way to acheive this, since I only want the amplitude of an given input/output sound to a c++ program ?

Thank you.
Mar 2, 2016 at 9:51pm
This sounds like a case of "I want to do something and C++ is going to have to let me do it". C++ was not made to take input from your sound card. If you want to do that, you might want to try programming for windows, as you would probably be able to get output to speakers through a native function.
Good luck!
Mar 3, 2016 at 2:00am
I would go about this by installing virtual audio cable (VAC) drivers, and then attempting to open the VAC device in the Windows WaveIn/WaveOut API, then capturing the stream.

EDIT - perhaps enabling stereomix would be sufficient - you may not need to download VAC drivers.
Last edited on Mar 3, 2016 at 2:02am
Mar 3, 2016 at 2:06am
But in the audacity program, they've done something like that and it is C++. I can record what's playing on my computer and there is sound gauges and amplitude, so I imagine there would be some way to do it without getting into the whole program ?
Mar 3, 2016 at 2:55am
Yeah, pretty sure that's done through stereomix.
Topic archived. No new replies allowed.