aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2012-05-01 15:34:34 +1200
committerMatthew Gregan <[email protected]>2012-05-01 15:34:34 +1200
commitef934741cc395e3cae49722b0a57dea479efe25f (patch)
tree2fca1e1ef3c436a71b0f0f2c8e7e66c281d95746
parentfaeaadae513c9850fd7418bd0e25493c4545390c (diff)
downloadcubeb-ef934741cc395e3cae49722b0a57dea479efe25f.tar.gz
cubeb-ef934741cc395e3cae49722b0a57dea479efe25f.zip
winmm, directsound: run refill thread at a higher priority.
-rw-r--r--src/cubeb_directsound.cpp2
-rw-r--r--src/cubeb_winmm.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/cubeb_directsound.cpp b/src/cubeb_directsound.cpp
index a9b9149..c3ee6fd 100644
--- a/src/cubeb_directsound.cpp
+++ b/src/cubeb_directsound.cpp
@@ -302,6 +302,8 @@ cubeb_init(cubeb ** context, char const * context_name)
}
ctx->refill_thread = reinterpret_cast<HANDLE>(thread);
+ SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL);
+
*context = ctx;
return CUBEB_OK;
diff --git a/src/cubeb_winmm.c b/src/cubeb_winmm.c
index 01d7023..b66f570 100644
--- a/src/cubeb_winmm.c
+++ b/src/cubeb_winmm.c
@@ -217,6 +217,8 @@ cubeb_init(cubeb ** context, char const * context_name)
return CUBEB_ERROR;
}
+ SetThreadPriority(ctx->thread, THREAD_PRIORITY_TIME_CRITICAL);
+
InitializeCriticalSection(&ctx->lock);
ctx->active_streams = 0;