Index: apps/playback.c =================================================================== --- apps/playback.c (revision 16454) +++ apps/playback.c (working copy) @@ -222,10 +222,6 @@ static struct track_info *prev_ti = NULL; /* Pointer to the previously played track */ -/* Set by buffering_audio_callback when the low buffer event is received, to - avoid flodding the audio queue with fill_file_buffer messages. */ -static bool lowbuffer_event_sent = false; - /* Set by the audio thread when the current track information has updated * and the WPS may need to update its cached information */ static bool track_changed = false; @@ -687,7 +683,6 @@ wps_offset += direction; /* Immediately update the playlist index */ playlist_next(direction); - last_peek_offset -= direction; track_changed = true; } else @@ -1501,11 +1496,9 @@ switch (ev) { case EVENT_BUFFER_LOW: - if (!lowbuffer_event_sent) { - LOGFQUEUE("buffering > audio Q_AUDIO_FILL_BUFFER"); - queue_post(&audio_queue, Q_AUDIO_FILL_BUFFER, 0); - lowbuffer_event_sent = true; - } + LOGFQUEUE("buffering > audio Q_AUDIO_FILL_BUFFER"); + queue_remove_from_head(&audio_queue, Q_AUDIO_FILL_BUFFER); + queue_post(&audio_queue, Q_AUDIO_FILL_BUFFER, 0); break; case EVENT_HANDLE_REBUFFER: @@ -1973,7 +1966,6 @@ track_changed = true; audio_generate_postbuffer_events(); - lowbuffer_event_sent = false; } static void audio_rebuffer(void) @@ -2046,12 +2038,12 @@ } } - if (auto_dir_skip) - { - /* Update the playlist */ - last_peek_offset -= ci.new_track; + /* Update the playlist */ + last_peek_offset -= ci.new_track; - /* If the track change was the result of an auto dir skip, + if (auto_dir_skip || !automatic_skip) + { + /* If the track change was manual or the result of an auto dir skip, we need to update the playlist now */ next_playlist_index = playlist_next(ci.new_track);