summaryrefslogtreecommitdiffstats
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.tar.bz2
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)
track_buffer_callback = NULL;
track_unbuffer_callback = NULL;
track_changed_callback = NULL;
- /* Just to prevent CUR_TI from being anything random. */
- track_ridx = 0;
+ track_ridx = 0; /* Just to prevent CUR_TI from being anything random. */
+ prev_ti = &tracks[MAX_TRACK-1]; /* And prevent prev_ti being random too */
mutex_init(&mutex_codecthread);
@@ -1198,6 +1198,7 @@ static void* codec_get_memory_callback(size_t *size)
static void codec_pcmbuf_position_callback(size_t size) ICODE_ATTR;
static void codec_pcmbuf_position_callback(size_t size)
{
+ /* This is called from an ISR, so be quick */
unsigned int time = size * 1000 / 4 / NATIVE_FREQUENCY +
prev_ti->id3.elapsed;
@@ -2656,7 +2657,7 @@ static void audio_fill_file_buffer(
bool had_next_track = audio_next_track() != NULL;
bool continue_buffering;
- if (!audio_initialize_buffer_fill(!start_play))
+ if (!audio_initialize_buffer_fill(start_play))
return ;
/* If we have a partially buffered track, continue loading,