From 8622d1a532ffa1219e79442b8a0d02cf717fc5df Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Mon, 24 Sep 2007 12:28:29 +0200 Subject: [PATCH] Disable codec_pcmbuf_position_callback for now. This callback is responsible for updating the elapsed time in the track while the playback code has already moved to the next track. Without it, the progresbar just stops before the end of the track. --- apps/playback.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 25a9fff01..2b4e62b69 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -233,7 +233,10 @@ static struct track_info tracks[MAX_TRACK]; static volatile int track_ridx = 0; /* Track being decoded (A/C-) */ static int track_widx = 0; /* Track being buffered (A) */ +#if 0 static struct track_info *prev_ti = NULL; /* Previous track info pointer (A/C-) */ +#endif + #define CUR_TI (&tracks[track_ridx]) /* Playing track info pointer (A/C-) */ /* Set by the audio thread when the current track information has updated @@ -1422,6 +1425,7 @@ static void* codec_get_memory_callback(size_t *size) return malloc_buf; } +#if 0 static void codec_pcmbuf_position_callback(size_t size) ICODE_ATTR; static void codec_pcmbuf_position_callback(size_t size) { @@ -1437,6 +1441,7 @@ static void codec_pcmbuf_position_callback(size_t size) else prev_ti->id3.elapsed = time; } +#endif static void codec_set_elapsed_callback(unsigned int value) { @@ -1825,7 +1830,7 @@ static void codec_discard_codec_callback(void) static inline void codec_gapless_track_change(void) { /* callback keeps the progress bar moving while the pcmbuf empties */ - pcmbuf_set_position_callback(codec_pcmbuf_position_callback); + /* pcmbuf_set_position_callback(codec_pcmbuf_position_callback); */ /* set the pcmbuf callback for when the track really changes */ pcmbuf_set_event_handler(codec_pcmbuf_track_changed_callback); } @@ -3062,7 +3067,7 @@ static int audio_check_new_track(void) } /* Save the old track */ - prev_ti = CUR_TI; + /* prev_ti = CUR_TI; */ /* Move to the new track */ track_ridx += ci.new_track; -- 2.11.4.GIT