diff options
-rw-r--r-- | apps/pcmbuf.c | 6 | ||||
-rw-r--r-- | apps/pcmbuf.h | 1 | ||||
-rw-r--r-- | apps/playback.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 47cb832be4..b8d8a0c8d0 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -1154,3 +1154,9 @@ bool pcmbuf_is_crossfade_enabled(void) return crossfade_enabled; } + +void pcmbuf_play_remainder(void) +{ + if (audiobuffer_fillpos) + pcmbuf_flush_fillpos(); +} diff --git a/apps/pcmbuf.h b/apps/pcmbuf.h index b4e551f74d..4cb1c1acb7 100644 --- a/apps/pcmbuf.h +++ b/apps/pcmbuf.h @@ -75,5 +75,6 @@ void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude); int pcmbuf_used_descs(void); int pcmbuf_descs(void); +void pcmbuf_play_remainder(void); #endif diff --git a/apps/playback.c b/apps/playback.c index 2c526a711e..53d2181bcf 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2182,6 +2182,8 @@ static void audio_stop_playback(void) /* If we were playing, save resume information */ if (playing) { + pcmbuf_play_remainder(); + struct mp3entry *id3 = NULL; if (!ci.stop_codec) |