diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-01 15:29:38 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 19:01:18 +0100 |
commit | f7c611ab71d292d64a6d4db8db8e36aaf0e2330b (patch) | |
tree | 2521af5ba64af64c9f5c667b419ff66fc1324f60 /servers/audio | |
parent | 39cece382d1c0f9f89eaa469a93497c50b516686 (diff) |
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/effects/audio_effect_delay.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_distortion.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/reverb_filter.cpp | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp index f71ff05b23..69c62e3a13 100644 --- a/servers/audio/effects/audio_effect_delay.cpp +++ b/servers/audio/effects/audio_effect_delay.cpp @@ -94,7 +94,7 @@ void AudioEffectDelayInstance::_process_chunk(const AudioFrame *p_src_frames, Au //apply lowpass and feedback gain AudioFrame fb_in = out * feedback_level_f * lpf_ic + h * lpf_c; - fb_in.undenormalise(); //avoid denormals + fb_in.undenormalize(); //avoid denormals h = fb_in; fb_buf[feedback_buffer_pos] = fb_in; diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp index 5987ed7bb2..95156d8d66 100644 --- a/servers/audio/effects/audio_effect_distortion.cpp +++ b/servers/audio/effects/audio_effect_distortion.cpp @@ -50,7 +50,7 @@ void AudioEffectDistortionInstance::process(const AudioFrame *p_src_frames, Audi float lofi_mult = powf(2.0, 2.0 + (1.0 - drive_f) * 14); //goes from 16 to 2 bits for (int i = 0; i < p_frame_count * 2; i++) { - float out = undenormalise(src[i] * lpf_ic + lpf_c * h[i & 1]); + float out = undenormalize(src[i] * lpf_ic + lpf_c * h[i & 1]); h[i & 1] = out; float a = out; float ha = src[i] - out; //high freqs diff --git a/servers/audio/effects/reverb_filter.cpp b/servers/audio/effects/reverb_filter.cpp index 0363706714..2b60b73b7e 100644 --- a/servers/audio/effects/reverb_filter.cpp +++ b/servers/audio/effects/reverb_filter.cpp @@ -77,7 +77,7 @@ void Reverb::process(float *p_src, float *p_dst, int p_frames) { read_pos += echo_buffer_size; } - float in = undenormalise(echo_buffer[read_pos] * params.predelay_fb + p_src[i]); + float in = undenormalize(echo_buffer[read_pos] * params.predelay_fb + p_src[i]); echo_buffer[echo_buffer_pos] = in; @@ -111,7 +111,7 @@ void Reverb::process(float *p_src, float *p_dst, int p_frames) { c.pos = 0; } - float out = undenormalise(c.buffer[c.pos] * c.feedback); + float out = undenormalize(c.buffer[c.pos] * c.feedback); out = out * (1.0 - c.damp) + c.damp_h * c.damp; //lowpass c.damp_h = out; c.buffer[c.pos] = input_buffer[j] + out; @@ -138,7 +138,7 @@ void Reverb::process(float *p_src, float *p_dst, int p_frames) { ap=&allpass[m_ap]; \ if (ap->pos>=ap_size_limit[m_ap]) \ ap->pos=0; \ - aux=undenormalise(ap->buffer[ap->pos]); \ + aux=undenormalize(ap->buffer[ap->pos]); \ in=sample; \ sample=-in+aux; \ ap->pos++; @@ -163,7 +163,7 @@ void Reverb::process(float *p_src, float *p_dst, int p_frames) { } float aux = a.buffer[a.pos]; - a.buffer[a.pos] = undenormalise(allpass_feedback * aux + p_dst[j]); + a.buffer[a.pos] = undenormalize(allpass_feedback * aux + p_dst[j]); p_dst[j] = aux - allpass_feedback * a.buffer[a.pos]; a.pos++; } |