Skip to content

Commit

Permalink
temp buffers are Box<[T]>, so:
Browse files Browse the repository at this point in the history
resize_temp_buffers is redundant
  • Loading branch information
magnetophon committed Nov 14, 2024
1 parent c895282 commit 376bf3f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ impl Plugin for Del2 {
let mut block_start: usize = 0;
let mut block_end: usize = MAX_BLOCK_SIZE.min(num_samples);

// self.resize_temp_buffers(block_end);
// write the audio buffer into the delay
self.write_into_delay(buffer);

Expand Down Expand Up @@ -1044,21 +1043,6 @@ impl Plugin for Del2 {
}

impl Del2 {
// Either we resize in the audio thread, or in the initialization fn
// If we don't, we are slower.
fn resize_temp_buffers(&mut self, max_size: usize) {
for i in 0..NUM_TAPS {
// self.delayed_audio_l[i].resize(max_size, 0.0);
// self.delayed_audio_r[i].resize(max_size, 0.0);
}
// self.gain.resize(max_size, 0.0);
// self.dry_wet.resize(max_size, 0.0);
// self.output_gain.resize(max_size, 0.0);
// self.global_drive.resize(max_size, 0.0);
// self.delay_tap_gain.resize(max_size, 0.0);
// self.delay_tap_amp_envelope.resize(max_size, 0.0);
}

fn update_min_max_tap_samples(&mut self) {
let sample_rate = self.sample_rate;
self.delay_data.max_tap_samples =
Expand Down

0 comments on commit 376bf3f

Please sign in to comment.