From ca8aec7c45edbea69dcb6421106ea5afff3e3fd8 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 2 Mar 2023 23:00:14 +0100 Subject: [PATCH] early-access version 3433 --- README.md | 2 +- src/audio_core/renderer/command/effect/reverb.cpp | 3 ++- src/audio_core/renderer/effect/i3dl2.h | 3 ++- src/audio_core/renderer/effect/reverb.h | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c6dae3060..d104597aa 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3432. +This is the source code for early-access 3433. ## Legal Notice diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp index 0a823acad..97692cbad 100755 --- a/src/audio_core/renderer/command/effect/reverb.cpp +++ b/src/audio_core/renderer/command/effect/reverb.cpp @@ -308,7 +308,8 @@ static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, Rever } Common::FixedPoint<50, 14> pre_delay_sample{ - state.pre_delay_line.Read() * Common::FixedPoint<50, 14>::from_base(params.late_gain)}; + state.pre_delay_line.TapOut(state.pre_delay_time) * + Common::FixedPoint<50, 14>::from_base(params.late_gain)}; std::array, ReverbInfo::MaxDelayLines> mix_matrix{ state.prev_feedback_output[2] + state.prev_feedback_output[1] + pre_delay_sample, diff --git a/src/audio_core/renderer/effect/i3dl2.h b/src/audio_core/renderer/effect/i3dl2.h index 97914f4f3..5572af2a0 100755 --- a/src/audio_core/renderer/effect/i3dl2.h +++ b/src/audio_core/renderer/effect/i3dl2.h @@ -104,7 +104,8 @@ public: } void Write(const Common::FixedPoint<50, 14> sample) { - *(input++) = sample; + *input = sample; + input++; if (input >= buffer_end) { input = buffer.data(); } diff --git a/src/audio_core/renderer/effect/reverb.h b/src/audio_core/renderer/effect/reverb.h index 76f31f212..c2b3e2c35 100755 --- 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(); }