mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-17 20:44:29 -04:00
fix(vm/compiler): invert the logic of the release flag in the voices (closes #102)
This makes all envelopes released by default, instead of attacking. Add also test to demonstrate the buggy behaviour.
This commit is contained in:
parent
20b0598a57
commit
1ac2ad3c75
@ -26,10 +26,11 @@ void SU_CALLCONV su_render_song(float* buffer) {
|
||||
synth->RandSeed = 1;
|
||||
// triger first voice
|
||||
synth->SynthWrk.Voices[0].Note = 64;
|
||||
synth->SynthWrk.Voices[0].Sustain = 1;
|
||||
samples = SU_LENGTH_IN_SAMPLES / 2;
|
||||
time = INT32_MAX;
|
||||
retval = su_render(synth, buffer, &samples, &time);
|
||||
synth->SynthWrk.Voices[0].Release++;
|
||||
synth->SynthWrk.Voices[0].Sustain = 0;
|
||||
buffer = buffer + SU_LENGTH_IN_SAMPLES;
|
||||
samples = SU_LENGTH_IN_SAMPLES / 2;
|
||||
time = INT32_MAX;
|
||||
|
Reference in New Issue
Block a user