Sfoglia il codice sorgente

Fix wavetable crash on instrument change after stop

dds
PaulStoffregen 6 anni fa
parent
commit
84073ecbfd
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. +6
    -4
      synth_wavetable.cpp

+ 6
- 4
synth_wavetable.cpp Vedi File

@@ -77,10 +77,12 @@ CODE_BLOCK_TO_TEST
*/
void AudioSynthWavetable::stop(void) {
cli();
env_state = STATE_RELEASE;
env_count = current_sample->RELEASE_COUNT;
if (env_count == 0) env_count = 1;
env_incr = -(env_mult) / (env_count * ENVELOPE_PERIOD);
if (env_state != STATE_IDLE) {
env_state = STATE_RELEASE;
env_count = current_sample->RELEASE_COUNT;
if (env_count == 0) env_count = 1;
env_incr = -(env_mult) / (env_count * ENVELOPE_PERIOD);
}
PRINT_ENV(STATE_RELEASE);
sei();
}

Loading…
Annulla
Salva