mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 13:04:25 -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
@ -37,6 +37,7 @@ int main(int argc, char* argv[]) {
|
||||
buffer = (float*)malloc(2 * sizeof(float) * su_max_samples);
|
||||
// triger first voice
|
||||
synth->SynthWrk.Voices[0].Note = 64;
|
||||
synth->SynthWrk.Voices[0].Sustain = 1;
|
||||
totalrendered = 0;
|
||||
// First check that when we render using su_render with 0 time
|
||||
// we get nothing done
|
||||
@ -110,7 +111,7 @@ int main(int argc, char* argv[]) {
|
||||
goto fail;
|
||||
}
|
||||
if (i == 8)
|
||||
synth->SynthWrk.Voices[0].Release++;
|
||||
synth->SynthWrk.Voices[0].Sustain = 0;
|
||||
}
|
||||
if (totalrendered != su_max_samples)
|
||||
{
|
||||
|
Reference in New Issue
Block a user