Skip to content

Commit

Permalink
Update audioadapter
Browse files Browse the repository at this point in the history
  • Loading branch information
HEnquist committed Oct 25, 2024
1 parent 64b4899 commit 6b52c9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ num-complex = { version = "0.4", optional = true }
num-integer = "0.1.45"
num-traits = "0.2"
#audioadapter = {path = "../audioadapter-rs"}
audioadapter = "0.1.0"
audioadapter = "0.2.0"

[dev-dependencies]
env_logger = "0.10.0"
Expand Down
16 changes: 2 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,8 @@ where
"output, {} is longer than delay to trim, {}, trimming..",
output_len, frames_to_trim
);
// move useful putput data to start of output buffer
for chan in 0..self.nbr_channels() {
if let Some(mask) = active_channels_mask {
if !mask[chan] {
continue;
}
}
for frame in 0..(output_len - frames_to_trim) {
let val = buffer_out
.read_sample(chan, frame + frames_to_trim)
.unwrap();
buffer_out.write_sample(chan, frame, &val);
}
}
// move useful output data to start of output buffer
buffer_out.copy_frames_within(frames_to_trim, 0, frames_to_trim);
// update counters
output_len -= frames_to_trim;
indexing.output_offset -= frames_to_trim;
Expand Down

0 comments on commit 6b52c9e

Please sign in to comment.