rodio icon indicating copy to clipboard operation
rodio copied to clipboard

How do I check the current amplitude/volume of the sound

Open kepexx opened this issue 6 years ago • 2 comments

It's done in games like Geometry Dash. In GD, the orbs get bigger if the music gets louder as a visual effect. I want to do something similar to that.

This isn't the volume method, since that just gets a multiplier that we multiply with the samples to make it louder/quieter. I want the actual, current volume that the person hears.

kepexx avatar Jul 09 '19 13:07 kepexx

surprisingly difficult to find a cross-platform example of getting the current default mixer volume.

jedahan avatar Nov 27 '20 21:11 jedahan

I'm also interested in this. I presume getting access to the underlying stream, or at least samples of it, would be the way to go. In a separate thread, it would be useful to get "windows" of frames to analyse for volume, frequency analysis (FFT), etc. but I'm not sure how to even start, and I don't see any examples of doing this kind of thing.

anselanza avatar Sep 15 '23 09:09 anselanza