Render some MIDI samples even when stopped

Because stopping MIDI playback puts any playing notes into release phase, they
should be rendered. Ideally it could stop rendering once output goes silent.
This commit is contained in:
Chris Robinson
2013-12-15 21:03:23 -08:00
parent f244ef6f82
commit 189d73dd87
+4 -3
View File
@@ -442,11 +442,12 @@ static void FSynth_process(FSynth *self, ALuint SamplesToDo, ALfloat (*restrict
ALenum state = synth->State;
ALuint total = 0;
if(state == AL_INITIAL)
return;
if(state != AL_PLAYING)
{
if(state == AL_PAUSED)
fluid_synth_write_float(self->Synth, SamplesToDo, DryBuffer[FrontLeft], 0, 1,
DryBuffer[FrontRight], 0, 1);
fluid_synth_write_float(self->Synth, SamplesToDo, DryBuffer[FrontLeft], 0, 1,
DryBuffer[FrontRight], 0, 1);
return;
}