Skip to content

Commit

Permalink
Make buffer reset 2x faster
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Horacek <petr@zlosynth.com>
  • Loading branch information
phoracek committed Nov 11, 2023
1 parent f988d8c commit 2fc0f66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ backwards compatibility.
* Allow configuration of the ratio between the tap interval and delay length.
* Visualize progress of the buffer reset.
* Smoothen position response to control input.
* Make clearing of the tape 2x faster.

## 1.2.0

Expand Down
4 changes: 2 additions & 2 deletions dsp/src/delay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,15 @@ impl BufferReset {
BufferReset::Armed => BufferReset::FadingOut(0, 50),
BufferReset::FadingOut(j, n) => {
if j == n {
let chunks = 2 << 11;
let chunks = 2 << 10;
BufferReset::Resetting(0, chunks)
} else {
BufferReset::FadingOut(*j + 1, *n)
}
}
BufferReset::Resetting(j, n) => {
if j == n {
BufferReset::FadingIn(0, 2000)
BufferReset::FadingIn(0, 1000)
} else {
reset_request = Some(ResetSelector {
index: *j,
Expand Down

0 comments on commit 2fc0f66

Please sign in to comment.