diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-28 09:32:52 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-28 09:32:52 +0000 |
commit | 6128ff34536de2443729913ec6922595fa29e9d5 (patch) | |
tree | c4b37738e2d3564c2b3a989d853103d3eebb09ee /apps | |
parent | 05ddd9a44eb565e936274b6f73fc76f7476113a7 (diff) |
Fixed one of the many pending bugs in the playback engine and restored
the instant wps skip feature.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10348 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c index 12e36e196e..b20603f1c9 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2157,6 +2157,10 @@ static void initiate_track_change(long direction) if (playlist_check(direction)) { playlist_end = false; + /* Flag track changed immediately so wps can update instantly. + * No need to wait for disk to spin up or message to travel + * through the deep queues as this info is only for the wps. */ + track_changed = true; ci.new_track += direction; } } @@ -2474,7 +2478,7 @@ struct mp3entry* audio_current_track(void) int cur_idx = track_ridx + ci.new_track; if (cur_idx >= MAX_TRACK) - cur_idx += MAX_TRACK; + cur_idx -= MAX_TRACK; else if (cur_idx < 0) cur_idx += MAX_TRACK; @@ -2572,7 +2576,10 @@ void audio_next(void) if (global_settings.beep) pcmbuf_beep(5000, 100, 2500*global_settings.beep); - queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)1); + /* Should be safe to do outside of thread, that way we get + * the instant wps response at least. */ + initiate_track_change(1); + // queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)1); } void audio_prev(void) @@ -2580,7 +2587,8 @@ void audio_prev(void) if (global_settings.beep) pcmbuf_beep(5000, 100, 2500*global_settings.beep); - queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)-1); + initiate_track_change(-1); + // queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)-1); } void audio_next_dir(void) |