diff options
Diffstat (limited to 'apps/playback.c')
-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) | |||
2157 | if (playlist_check(direction)) | 2157 | if (playlist_check(direction)) |
2158 | { | 2158 | { |
2159 | playlist_end = false; | 2159 | playlist_end = false; |
2160 | /* Flag track changed immediately so wps can update instantly. | ||
2161 | * No need to wait for disk to spin up or message to travel | ||
2162 | * through the deep queues as this info is only for the wps. */ | ||
2163 | track_changed = true; | ||
2160 | ci.new_track += direction; | 2164 | ci.new_track += direction; |
2161 | } | 2165 | } |
2162 | } | 2166 | } |
@@ -2474,7 +2478,7 @@ struct mp3entry* audio_current_track(void) | |||
2474 | int cur_idx = track_ridx + ci.new_track; | 2478 | int cur_idx = track_ridx + ci.new_track; |
2475 | 2479 | ||
2476 | if (cur_idx >= MAX_TRACK) | 2480 | if (cur_idx >= MAX_TRACK) |
2477 | cur_idx += MAX_TRACK; | 2481 | cur_idx -= MAX_TRACK; |
2478 | else if (cur_idx < 0) | 2482 | else if (cur_idx < 0) |
2479 | cur_idx += MAX_TRACK; | 2483 | cur_idx += MAX_TRACK; |
2480 | 2484 | ||
@@ -2572,7 +2576,10 @@ void audio_next(void) | |||
2572 | if (global_settings.beep) | 2576 | if (global_settings.beep) |
2573 | pcmbuf_beep(5000, 100, 2500*global_settings.beep); | 2577 | pcmbuf_beep(5000, 100, 2500*global_settings.beep); |
2574 | 2578 | ||
2575 | queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)1); | 2579 | /* Should be safe to do outside of thread, that way we get |
2580 | * the instant wps response at least. */ | ||
2581 | initiate_track_change(1); | ||
2582 | // queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)1); | ||
2576 | } | 2583 | } |
2577 | 2584 | ||
2578 | void audio_prev(void) | 2585 | void audio_prev(void) |
@@ -2580,7 +2587,8 @@ void audio_prev(void) | |||
2580 | if (global_settings.beep) | 2587 | if (global_settings.beep) |
2581 | pcmbuf_beep(5000, 100, 2500*global_settings.beep); | 2588 | pcmbuf_beep(5000, 100, 2500*global_settings.beep); |
2582 | 2589 | ||
2583 | queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)-1); | 2590 | initiate_track_change(-1); |
2591 | // queue_post(&audio_queue, Q_AUDIO_SKIP, (void *)-1); | ||
2584 | } | 2592 | } |
2585 | 2593 | ||
2586 | void audio_next_dir(void) | 2594 | void audio_next_dir(void) |