Skip to content

Commit

Permalink
filter: process correct samples when block is cut
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetophon committed Nov 4, 2024
1 parent 82e1aea commit e984cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ impl Plugin for Del2 {
self.delayed_audio_r[tap_index][sample_idx] *= pre_filter_gain;
}

for i in (0..block_len).step_by(2) {
for i in (block_start..block_end).step_by(2) {
let frame = f32x4::from_array([
self.delayed_audio_l[tap_index][i],
self.delayed_audio_r[tap_index][i],
Expand All @@ -964,7 +964,7 @@ impl Plugin for Del2 {
let frame_out = *processed.as_array();
self.delayed_audio_l[tap_index][i] = frame_out[0];
self.delayed_audio_r[tap_index][i] = frame_out[1];
if i + 1 < block_len {
if i + 1 < block_end {
self.delayed_audio_l[tap_index][i + 1] = frame_out[2];
self.delayed_audio_r[tap_index][i + 1] = frame_out[3];
}
Expand Down

0 comments on commit e984cf3

Please sign in to comment.