summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-10-26 12:13:28 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-10-26 12:13:28 +0000
commit34193e5cf23e7d739c2ccda0ed82e77492578cef (patch)
tree11927ae2a046c938137b822246831cef7859c5dc
parent1d6bfa972cdb288950792dbd35302c59207fbcfd (diff)
downloadrockbox-34193e5cf23e7d739c2ccda0ed82e77492578cef.tar.gz
rockbox-34193e5cf23e7d739c2ccda0ed82e77492578cef.zip
Don't clear previous track details during playback so the progress bar works properly at track transition
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11350 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 7b952e6919..a3e12c3d08 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -686,8 +686,8 @@ void audio_preinit(void)
686 track_buffer_callback = NULL; 686 track_buffer_callback = NULL;
687 track_unbuffer_callback = NULL; 687 track_unbuffer_callback = NULL;
688 track_changed_callback = NULL; 688 track_changed_callback = NULL;
689 /* Just to prevent CUR_TI from being anything random. */ 689 track_ridx = 0; /* Just to prevent CUR_TI from being anything random. */
690 track_ridx = 0; 690 prev_ti = &tracks[MAX_TRACK-1]; /* And prevent prev_ti being random too */
691 691
692 mutex_init(&mutex_codecthread); 692 mutex_init(&mutex_codecthread);
693 693
@@ -1198,6 +1198,7 @@ static void* codec_get_memory_callback(size_t *size)
1198static void codec_pcmbuf_position_callback(size_t size) ICODE_ATTR; 1198static void codec_pcmbuf_position_callback(size_t size) ICODE_ATTR;
1199static void codec_pcmbuf_position_callback(size_t size) 1199static void codec_pcmbuf_position_callback(size_t size)
1200{ 1200{
1201 /* This is called from an ISR, so be quick */
1201 unsigned int time = size * 1000 / 4 / NATIVE_FREQUENCY + 1202 unsigned int time = size * 1000 / 4 / NATIVE_FREQUENCY +
1202 prev_ti->id3.elapsed; 1203 prev_ti->id3.elapsed;
1203 1204
@@ -2656,7 +2657,7 @@ static void audio_fill_file_buffer(
2656 bool had_next_track = audio_next_track() != NULL; 2657 bool had_next_track = audio_next_track() != NULL;
2657 bool continue_buffering; 2658 bool continue_buffering;
2658 2659
2659 if (!audio_initialize_buffer_fill(!start_play)) 2660 if (!audio_initialize_buffer_fill(start_play))
2660 return ; 2661 return ;
2661 2662
2662 /* If we have a partially buffered track, continue loading, 2663 /* If we have a partially buffered track, continue loading,