aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-16 10:31:38 -0700
committerChris Robinson <[email protected]>2011-05-16 10:31:38 -0700
commit569106acd35913882d430c473303ed9dcc5a1ba0 (patch)
treed19ac90c1f8ee3cbb51dcc6fb8484f5036b0297e
parent507d2f8afbd4e6c3bef034bfd02c7f46d52dc1e7 (diff)
Fix COM initialization with MMDevApi
-rw-r--r--Alc/mmdevapi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c
index 21fed0d5..052ff6f3 100644
--- a/Alc/mmdevapi.c
+++ b/Alc/mmdevapi.c
@@ -71,7 +71,9 @@ static void *MMDevApiLoad(void)
if(!Enumerator)
{
void *mme = NULL;
- HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
+ HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ if(FAILED(hr))
+ hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if(SUCCEEDED(hr))
{
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, &mme);