summaryrefslogtreecommitdiffstats
path: root/base/threading/platform_thread_win.cc
diff options
context:
space:
mode:
authorhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 09:41:12 +0000
committerhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 09:41:12 +0000
commitf5968e6ada72f515d7d183e67e35f90d7704daee (patch)
tree28f4fcbe9850f52dc7196c5a1db394b0aa2d577a /base/threading/platform_thread_win.cc
parenta80a258880e3ababe9f806dd9bb4d60ad90473ae (diff)
downloadchromium_src-f5968e6ada72f515d7d183e67e35f90d7704daee.zip
chromium_src-f5968e6ada72f515d7d183e67e35f90d7704daee.tar.gz
chromium_src-f5968e6ada72f515d7d183e67e35f90d7704daee.tar.bz2
Low-latency AudioInputStream implementation based on WASAPI for Windows.
Requires Windows Vista or higher. BUG=none TEST=Attached unit test (requires undefined CHROME_HEADLESS) Review URL: http://codereview.chromium.org/8283032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading/platform_thread_win.cc')
-rw-r--r--base/threading/platform_thread_win.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index d5e64c1..03e0831 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -157,9 +157,19 @@ void PlatformThread::Join(PlatformThreadHandle thread_handle) {
}
// static
-void PlatformThread::SetThreadPriority(PlatformThreadHandle, ThreadPriority) {
- // TODO(crogers): implement
- NOTIMPLEMENTED();
+void PlatformThread::SetThreadPriority(PlatformThreadHandle handle,
+ ThreadPriority priority) {
+ switch (priority) {
+ case kThreadPriority_Normal:
+ ::SetThreadPriority(handle, THREAD_PRIORITY_NORMAL);
+ break;
+ case kThreadPriority_RealtimeAudio:
+ ::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
+ break;
+ default:
+ NOTIMPLEMENTED();
+ break;
+ }
}
} // namespace base