Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix another regression introduced by #1314 #1470

Open
wants to merge 3 commits into
base: dsp-cpp
Choose a base branch
from
Open

Conversation

derselbst
Copy link
Member

When a voice is playing in delay phase, its amplitude and amplitude increment aren't updated or cleared, causing it to inherit them from a previous voice. Previously, if the increment was non-zero, nothing prevented the amplitude of the voice from rising infinitely while it was playing in delay phase.

To fix this one could either explicitly prune the amplitude to zero in this case. However, it would still attempt to read the sample buffer and multiply them with a zero amplitude, resulting in a zero sample, which is unnecessarily wasteful.

Because of that, this PR adds a new DSP routine, whose only purpose is to write silence to the dsp buffer and update the dsp phase of the voice accordingly.

Fixes #1451

@derselbst derselbst added the bug label Jan 12, 2025
@derselbst derselbst added this to the 2.4 milestone Jan 12, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant