0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-25 23:35:12 +00:00

Update default envelope

This commit is contained in:
Bad Diode 2023-10-17 21:17:07 +02:00
parent fca3b46d81
commit 74d81621d0

View file

@ -91,16 +91,14 @@ env_on(Envelope *env) {
env->stage = ENV_DECAY;
env->vol = 1.0f;
}
if (env->d > 0) {
env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / env->d;
} else {
env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / 10.0f;
if (env->d < 10.0f) {
env->d = 10.0f;
}
if (env->r > 0) {
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / env->r;
} else {
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / 10.0f;
env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / env->d;
if (env->r < 10.0f) {
env->r = 10.0f;
}
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / env->r;
}
void