summaryrefslogtreecommitdiff
path: root/servers/audio/effects/audio_effect_eq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/audio/effects/audio_effect_eq.cpp')
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index b315fdc3bb..e8d38f87a3 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -32,7 +32,6 @@
#include "servers/audio_server.h"
void AudioEffectEQInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
-
int band_count = bands[0].size();
EQ::BandProcess *proc_l = bands[0].ptrw();
EQ::BandProcess *proc_r = bands[1].ptrw();
@@ -42,12 +41,10 @@ void AudioEffectEQInstance::process(const AudioFrame *p_src_frames, AudioFrame *
}
for (int i = 0; i < p_frame_count; i++) {
-
AudioFrame src = p_src_frames[i];
AudioFrame dst = AudioFrame(0, 0);
for (int j = 0; j < band_count; j++) {
-
float l = src.l;
float r = src.r;
@@ -92,7 +89,6 @@ int AudioEffectEQ::get_band_count() const {
}
bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) {
-
const Map<StringName, int>::Element *E = prop_band_map.find(p_name);
if (E) {
set_band_gain_db(E->get(), p_value);
@@ -103,7 +99,6 @@ bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) {
}
bool AudioEffectEQ::_get(const StringName &p_name, Variant &r_ret) const {
-
const Map<StringName, int>::Element *E = prop_band_map.find(p_name);
if (E) {
r_ret = get_band_gain_db(E->get());
@@ -114,22 +109,18 @@ bool AudioEffectEQ::_get(const StringName &p_name, Variant &r_ret) const {
}
void AudioEffectEQ::_get_property_list(List<PropertyInfo> *p_list) const {
-
for (int i = 0; i < band_names.size(); i++) {
-
p_list->push_back(PropertyInfo(Variant::FLOAT, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1"));
}
}
void AudioEffectEQ::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_band_gain_db", "band_idx", "volume_db"), &AudioEffectEQ::set_band_gain_db);
ClassDB::bind_method(D_METHOD("get_band_gain_db", "band_idx"), &AudioEffectEQ::get_band_gain_db);
ClassDB::bind_method(D_METHOD("get_band_count"), &AudioEffectEQ::get_band_count);
}
AudioEffectEQ::AudioEffectEQ(EQ::Preset p_preset) {
-
eq.set_mix_rate(AudioServer::get_singleton()->get_mix_rate());
eq.set_preset_band_mode(p_preset);
gain.resize(eq.get_band_count());