In the new features section of the release notes for 3.1, it mentions that they added `AudioSettings.outputSampleRate` which "Returns the mixer's output rate; use this to calculate the precise hertz range returned from GetSpectrumData()," but there's no documentation in the web version of the scripting reference and no description in the local version. I would think that dividing it by the number of samples I'm using in GetSpectrumData would give me the frequency range for each bucket in the float array, but that doesn't appear to be the case.
For example, I'm playing a 500Hz tone and taking 128 samples. AudioSettings.outputSampleRate returns 44100. This value gives me a bucket frequency range of 344Hz/index, putting 500Hz in bucket 1 (zero-indexed), but in reality, the tone triggers index 3.
Am I doing something wrong or misunderstanding how I should be using this value?
In a general sense, how do I convert a frequency to its expected index in the output array from GetSpectrumData?
This deserves a BUMP!
– anon42580617