From 0eaf8583b7eda915477a931df746173d9a9e5df9 Mon Sep 17 00:00:00 2001
From: Takamichi Horikawa <takamichiho@gmail.com>
Date: Wed, 25 Jan 2017 23:45:00 +0900
Subject: set directsound thread priority (horribly glitches on actual win10
 without this)

---
 win32/dsoundout.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'win32')

diff --git a/win32/dsoundout.c b/win32/dsoundout.c
index 6fda977..0f7ebc4 100644
--- a/win32/dsoundout.c
+++ b/win32/dsoundout.c
@@ -129,6 +129,7 @@ struct dsound_state *dsound_init(HWND hwnd, unsigned srate, unsigned sectlen,
 
   dsound->e_posnotf = CreateEventW(NULL, FALSE, FALSE, L"SNDNOTF");
   dsound->t_update = CreateThread(NULL, 0, bufupdatethread, dsound, 0, NULL);
+  SetThreadPriority(dsound->t_update, THREAD_PRIORITY_HIGHEST);
   dsound->sectlen = sectlen;
   dsound->playing = 0;
   dsound->terminate = 0;
-- 
cgit v1.2.3