summaryrefslogtreecommitdiffstats
path: root/src/audio_core/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/renderer')
-rw-r--r--src/audio_core/renderer/command/effect/reverb.cpp3
-rw-r--r--src/audio_core/renderer/effect/i3dl2.h3
-rw-r--r--src/audio_core/renderer/effect/reverb.h8
3 files changed, 8 insertions, 6 deletions
diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp
index 6fe844ff0..8b9b65214 100644
--- 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<Common::FixedPoint<50, 14>, 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 1ebbc5c4c..6e3ffd1d4 100644
--- 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 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();
}