diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-10-27 15:35:51 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-10-27 15:35:51 +0000 |
commit | 41add08c5edb9d3de7e223e860cef035b41a3b01 (patch) | |
tree | 8b41c24f35ac9f37c0efd8f11264ca2fc23e3a61 | |
parent | d0c44f52d75ea6d2806d65bb77e8670ccefe6062 (diff) |
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
-rw-r--r-- | apps/playback.c | 4 |
1 files changed, 1 insertions, 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) { |