diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-11-11 05:33:24 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-11-11 05:33:24 +0000 |
| commit | 8a82892e52127f50efaafaeda3ae841e8bbefe2d (patch) | |
| tree | 1dfa1a18c05018045db4fe8e67d1dc3fbc5a2d72 /apps/playback.c | |
| parent | 806d8f3505ef7e477f9af4d1b07fe30cd1f28fb3 (diff) | |
| download | rockbox-8a82892e52127f50efaafaeda3ae841e8bbefe2d.zip rockbox-8a82892e52127f50efaafaeda3ae841e8bbefe2d.tar.gz rockbox-8a82892e52127f50efaafaeda3ae841e8bbefe2d.tar.bz2 rockbox-8a82892e52127f50efaafaeda3ae841e8bbefe2d.tar.xz | |
Thread API enhancements.
1) block_thread -> block_thread + block_thread_w_tmo -- this call was always used in distinct ways so having one call with a conditional was ugly.
2) enhance Slasheri's scheduler controlled boost concept. now any thread may trigger a boost which will last until that thread next sleeps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11509 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
| -rw-r--r-- | apps/playback.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c index 6fed765..62dd039 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2151,7 +2151,11 @@ static bool audio_yield_codecs(void) while ((pcmbuf_is_crossfade_active() || pcmbuf_is_lowdata()) && !ci.stop_codec && playing && !audio_filebuf_is_lowdata()) { - sleep(1); + if (filling) + yield(); + else + sleep(2); + if (!queue_empty(&audio_queue)) return true; } |