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:
+4
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user