Browse Source
Merge pull request #9890 from Kelebek1/reverb_fix
Fix a bug with the Reverb command in reading from the pre delay line
pull/15/merge
liamwhite
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
6 deletions
-
src/audio_core/renderer/command/effect/reverb.cpp
-
src/audio_core/renderer/effect/i3dl2.h
-
src/audio_core/renderer/effect/reverb.h
|
|
|
@ -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, |
|
|
|
|
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
|