From 41add08c5edb9d3de7e223e860cef035b41a3b01 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Sat, 27 Oct 2007 15:35:51 +0000 Subject: Prevent the audio queue from getting flooded with fill buffer messages. The low buffer callback is registred by instead of the function it calls to prevent a loop. audio_check_new_track() also makes more sense because that's where tracks are made useless by a skip. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15335 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 2425cf5376..2ac54e7d74 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2594,8 +2594,6 @@ static void audio_fill_file_buffer(bool start_play, size_t offset) if (!queue_empty(&audio_queue)) { /* There's a message in the queue. break the loop to treat it, and go back to filling after that. */ - LOGFQUEUE("buffering > audio Q_AUDIO_FILL_BUFFER"); - queue_post(&audio_queue, Q_AUDIO_FILL_BUFFER, 0); break; } } while (continue_buffering); @@ -2604,7 +2602,6 @@ static void audio_fill_file_buffer(bool start_play, size_t offset) track_changed = true; audio_generate_postbuffer_events(); - register_buffer_low_callback(low_buffer_callback); } static void audio_rebuffer(void) @@ -2702,6 +2699,7 @@ static int audio_check_new_track(void) track_ridx &= MAX_TRACK_MASK; buf_set_base_handle(CUR_TI->audio_hid); + register_buffer_low_callback(low_buffer_callback); if (automatic_skip) { -- cgit v1.2.3