summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 65d7fbe204..4af457cd44 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1098,13 +1098,19 @@ static void codec_advance_buffer_loc_callback(void *ptr)
1098static void codec_seek_complete_callback(void) 1098static void codec_seek_complete_callback(void)
1099{ 1099{
1100 logf("seek_complete"); 1100 logf("seek_complete");
1101 if (pcm_is_paused()) 1101 /* If seeking-while-playing, pcm playback is actually paused (pcm_is_paused())
1102 { 1102 * but the paused flag is not set. If seeking-while-paused, the (paused) flag is
1103 /* If this is not a seamless seek, clear the buffer */ 1103 * set, but pcm playback may have actually stopped due to a previous buffer clear.
1104 * The buffer clear below occurs with either condition. A seemless seek skips
1105 * this section and no buffer clear occurs.
1106 */
1107 if (pcm_is_paused() || paused)
1108 {
1109 /* Clear the buffer */
1104 pcmbuf_play_stop(); 1110 pcmbuf_play_stop();
1105 dsp_configure(ci.dsp, DSP_FLUSH, 0); 1111 dsp_configure(ci.dsp, DSP_FLUSH, 0);
1106 1112
1107 /* If playback was not 'deliberately' paused, unpause now */ 1113 /* If seeking-while-playing, resume pcm playback */
1108 if (!paused) 1114 if (!paused)
1109 pcmbuf_pause(false); 1115 pcmbuf_pause(false);
1110 } 1116 }