diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:07:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:09:40 -0300 |
commit | bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch) | |
tree | d836011e3d5873e3ceea328ea3100f3c7719ab99 /servers/audio/effects/audio_effect_eq.cpp | |
parent | 7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff) | |
download | redot-engine-bc2e8d99e5ae0dbd69e712cc71da3033f5f30139.tar.gz |
Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
Diffstat (limited to 'servers/audio/effects/audio_effect_eq.cpp')
-rw-r--r-- | servers/audio/effects/audio_effect_eq.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp index 15905e3e0e..dc0e00e9a3 100644 --- a/servers/audio/effects/audio_effect_eq.cpp +++ b/servers/audio/effects/audio_effect_eq.cpp @@ -33,9 +33,9 @@ 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].ptr(); - EQ::BandProcess *proc_r = bands[1].ptr(); - float *bgain = gains.ptr(); + EQ::BandProcess *proc_l = bands[0].ptrw(); + EQ::BandProcess *proc_r = bands[1].ptrw(); + float *bgain = gains.ptrw(); for (int i = 0; i < band_count; i++) { bgain[i] = Math::db2linear(base->gain[i]); } |