Audio icon indicating copy to clipboard operation
Audio copied to clipboard

Calling AudioEffectEnvelope::noteOff repeatedly keeps it in release state

Open skybrian opened this issue 6 years ago • 1 comments

I had a confusing bug in my code where an envelope never became inactive. It turns out this is because calling noteOff() when the envelope is already in the release state resets the count, starting it over at the beginning. I expected noteOff() to be idempotent if the note is already being released. (My code was polling a button and calling noteOff() repeatedly if it's not being pressed.)

Verified by looking at the code in github. The workaround is to do your own edge detection, rather than relying on noteOff() to be idempotent.

skybrian avatar Jan 14 '20 02:01 skybrian

Fixed by #481

h4yn0nnym0u5e avatar Sep 14 '24 12:09 h4yn0nnym0u5e