diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-06 17:23:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 17:23:34 +0100 |
commit | 6d61430311d57fa4338bcf33cdcbb04a9a2f16c4 (patch) | |
tree | b64bddd5330a8c92a41dad1933a51be008696e20 /src/audio_core/renderer/effect/reverb.h | |
parent | Merge pull request #9910 from jbeich/libc++ (diff) | |
parent | Fix a bug with the Reverb command in reading from the pre_delay line. (diff) | |
download | yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar.gz yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar.bz2 yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar.lz yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar.xz yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.tar.zst yuzu-6d61430311d57fa4338bcf33cdcbb04a9a2f16c4.zip |
Diffstat (limited to 'src/audio_core/renderer/effect/reverb.h')
-rw-r--r-- | src/audio_core/renderer/effect/reverb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio_core/renderer/effect/reverb.h b/src/audio_core/renderer/effect/reverb.h index a72475c3c..6cc345ef6 100644 --- a/src/audio_core/renderer/effect/reverb.h +++ b/src/audio_core/renderer/effect/reverb.h @@ -79,12 +79,10 @@ public: return; } sample_count = delay_time; - input = &buffer[(output - buffer.data() + sample_count) % (sample_count_max + 1)]; + input = &buffer[0]; } Common::FixedPoint<50, 14> Tick(const Common::FixedPoint<50, 14> sample) { - Write(sample); - auto out_sample{Read()}; output++; @@ -92,6 +90,7 @@ public: output = buffer.data(); } + Write(sample); return out_sample; } @@ -100,7 +99,8 @@ public: } void Write(const Common::FixedPoint<50, 14> sample) { - *(input++) = sample; + *input = sample; + input++; if (input >= buffer_end) { input = buffer.data(); } |