Cannot find member "MAGNITUDE_MAX" in base "AudioEffectSpectrumAnalyzer"

Godot Version

4.1.1

Question

I need to use the frequency of the sound in real time and thought I could use the get_magnitude_for_frequency_range(20, 20000, AudioEffectSpectrumAnalyzer.MAGNITUDE_MAX) function.
but as it turned out it doesn’t exist and I don’t know what to do now, help me

func _ready():
	spectrum = AudioServer.get_bus_effect_instance(1, 0)

func _process(delta):
	spectrum.get_magnitude_for_frequency_range(20, 20000, AudioEffectSpectrumAnalyzer.MAGNITUDE_MAX)

So, I need to used

AudioEffectSpectrumAnalyzerInstance

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.