forked from len0rd/rockbox
Priority overriding was not working correctly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11573 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fbac4f8444
commit
e3b0937a4a
1 changed files with 7 additions and 3 deletions
|
|
@ -240,10 +240,14 @@ static void pcmbuf_under_watermark(void)
|
||||||
#ifdef HAVE_PRIORITY_SCHEDULING
|
#ifdef HAVE_PRIORITY_SCHEDULING
|
||||||
static int old_priority = 0;
|
static int old_priority = 0;
|
||||||
|
|
||||||
if (LOW_DATA(2) && !old_priority && pcm_is_playing())
|
if (LOW_DATA(2) && pcm_is_playing())
|
||||||
|
{
|
||||||
|
if (!old_priority)
|
||||||
{
|
{
|
||||||
/* Buffer is critically low so override UI priority. */
|
/* Buffer is critically low so override UI priority. */
|
||||||
old_priority = thread_set_priority(codec_thread_p, PRIORITY_REALTIME);
|
old_priority = thread_set_priority(codec_thread_p,
|
||||||
|
PRIORITY_REALTIME);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (old_priority)
|
else if (old_priority)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue