From 69e9738a1c7bba243eda271f1e22ef8b0b5a1cec Mon Sep 17 00:00:00 2001 From: Sebastian Leonhardt Date: Sat, 1 Oct 2016 22:55:31 +0200 Subject: [PATCH] Midi Player: fix playback of buffer remains when seeking Change-Id: Iccf4444b9c8ae421b9e44332791a789a767ae411 --- apps/plugins/midi/midiplay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index 20070f6716..6df1578bb3 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -484,6 +484,8 @@ static int midimain(const void * filename) /* but run through the tracks without the synth running */ rb->pcm_play_stop(); seekBackward(5); + lastswap = !swap; + synthbuf(); midi_debug("Rewind to %d:%02d\n", playing_time/60, playing_time%60); if (is_playing) rb->pcm_play_data(&get_more, NULL, NULL, 0); @@ -494,6 +496,8 @@ static int midimain(const void * filename) { rb->pcm_play_stop(); seekForward(5); + lastswap = !swap; + synthbuf(); midi_debug("Skip to %d:%02d\n", playing_time/60, playing_time%60); if (is_playing) rb->pcm_play_data(&get_more, NULL, NULL, 0);