0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-12-01 18:17:25 +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->stage = ENV_DECAY;
env->vol = 1.0f; env->vol = 1.0f;
} }
if (env->d > 0) { if (env->d < 10.0f) {
env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / env->d; env->d = 10.0f;
} else {
env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / 10.0f;
} }
if (env->r > 0) { env->d = (SOUND_TIMER / AUDIO_BUFSIZE) / env->d;
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / env->r; if (env->r < 10.0f) {
} else { env->r = 10.0f;
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / 10.0f;
} }
env->r = (SOUND_TIMER / AUDIO_BUFSIZE) / env->r;
} }
void void