-
Notifications
You must be signed in to change notification settings - Fork 69
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
Waveforms can't have 0ms attack/delay/release values #561
Comments
A quick fix (as suggested by @Daft-Freak ) would be to not allow |
Realised I've been working around this for a while: https://github.com/Daft-Freak/32blit-music-player/blob/a4cffc81413696586c7e1eaec0ab2cfc4389118e/mp3-stream.cpp#L237-L239 Clamping if(![phase]_ms) {
adsr = [target];
trigger_[next_phase]();
return;
} In all the Edit: Whoops, posted at the same time! |
Looks like we need the ability to disable/bypass the envelope generator altogether? The >0ms transition times are generally intentional to avoid pops/clicks from harsh audio transitions, but it would seem that's not always the desired outcome for wave samples? |
I suppose you might want to use it as a fade-in/out for MP3-based music? Otherwise I just want to either mix a bunch of waves (DOOM) or could do without the entire audio system (emulator)... But as always, I'm slightly misusing everything :) |
Your kind of misuse is the best kind of misuse, though, and anything we can fix to support that is probably a net benefit for the future of 32blit. Getting the audio-engine out of the way certainly isn't the crime of the century. 😆 Been a while since I touched the audio code, but an |
Calling
channels[x].trigger_attack()
whenchannels[x].attack_ms
= 0 causes a divide by zero error.This also happens with decay and release.
The code which causes this error is in
audio.hpp
.The text was updated successfully, but these errors were encountered: