Midi Player: fix playback of buffer remains when seeking

Change-Id: Iccf4444b9c8ae421b9e44332791a789a767ae411
This commit is contained in:
Sebastian Leonhardt 2016-10-01 22:55:31 +02:00 committed by Gerrit Rockbox
parent e813c3f50b
commit 69e9738a1c

View file

@ -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);