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:
parent
fca3b46d81
commit
74d81621d0
1 changed files with 6 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue