summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/pcmbuf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 347a9fa8fb..e87d27f261 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -240,10 +240,14 @@ static void pcmbuf_under_watermark(void)
240#ifdef HAVE_PRIORITY_SCHEDULING 240#ifdef HAVE_PRIORITY_SCHEDULING
241 static int old_priority = 0; 241 static int old_priority = 0;
242 242
243 if (LOW_DATA(2) && !old_priority && pcm_is_playing()) 243 if (LOW_DATA(2) && pcm_is_playing())
244 { 244 {
245 /* Buffer is critically low so override UI priority. */ 245 if (!old_priority)
246 old_priority = thread_set_priority(codec_thread_p, PRIORITY_REALTIME); 246 {
247 /* Buffer is critically low so override UI priority. */
248 old_priority = thread_set_priority(codec_thread_p,
249 PRIORITY_REALTIME);
250 }
247 } 251 }
248 else if (old_priority) 252 else if (old_priority)
249 { 253 {