diff options
author | Chris Robinson <[email protected]> | 2013-12-15 21:03:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-15 21:03:23 -0800 |
commit | 189d73dd871a7fdf175cb76ab7c473f0d1a4e223 (patch) | |
tree | 1705326acbc6c752ecb17f61b7c187e66f6f43ac | |
parent | f244ef6f8214a8af30fdbc035e3331299c8acb00 (diff) |
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.
-rw-r--r-- | OpenAL32/alMidi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenAL32/alMidi.c b/OpenAL32/alMidi.c index 00068ffc..0f269463 100644 --- a/OpenAL32/alMidi.c +++ b/OpenAL32/alMidi.c @@ -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; } |