My main goal is to get how “loud” the input from a mic is.
Right now I’m using something based on the example in the link below to get the spectrum data, and then look for the higher values to determine the loudness:
This seems to be working fine, particularly when using a “normal” mic (1-2 channels).
But I want to be able to use an Asio device that has 12 input channels, and using that device I see a significant drop in the fps.
After profiling, the part that takes most of the time seems to be the FFT.
I actually only need 1 or 2 channels from that device, so I’d like to know if it’s possible to have the spectrum analysis only on those specific channels.
Or, any suggestions on how to get decent results for the mic volume with faster methods (ie not using spectrum analysis), would also be appreciated.
(For reference, I’m programming in Unity but without FMOD Studio.)