So I am making a responsive audio waveform, if you don't know what that is, it is something like this: (btw this is my goal to make those audio waveforms).
I don't know how to describe it, so just look at the videos and image.
but my question is, how do I get the values from the "AudioSpectrumListener", it has a lambda expression.
And I need the value of the magnitude. So I can print out the values.
Later I will use the values to make rectangles and that rectangles will change height shape because of the changing value from the magnitude.
I looked at some examples and tutorials, here are some:
as you can see, I used animation timer, because the "AudioSpectrumInterval" is on 60, that means it updates 60 times in a second.
I can use a for a loop too, but it will print out the same values about a couple of times, or even more than that.