aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/dsound.c10
-rw-r--r--CMakeLists.txt13
2 files changed, 1 insertions, 22 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index dbe72c77..5313b039 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -161,13 +161,8 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
return ALC_FALSE;
}
- //Init COM
- CoInitialize(NULL);
-
//DirectSound Init code
- hr = CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (LPVOID*)&pData->lpDS);
- if(SUCCEEDED(hr))
- hr = IDirectSound_Initialize(pData->lpDS, guid);
+ hr = DirectSoundCreate(guid, &pData->lpDS, NULL);
if(SUCCEEDED(hr))
hr = IDirectSound_SetCooperativeLevel(pData->lpDS, GetForegroundWindow(), DSSCL_PRIORITY);
@@ -307,9 +302,6 @@ static void DSoundClosePlayback(ALCdevice *device)
IDirectSoundBuffer_Release(pData->DSpbuffer);
IDirectSound_Release(pData->lpDS);
- //Deinit COM
- CoUninitialize();
-
free(pData);
device->ExtraData = NULL;
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46c34e3d..5927a935 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -247,14 +247,6 @@ ENDIF()
# Check DSound/MMSystem backend
IF(HAVE_WINDOWS_H)
- SET(CMAKE_REQUIRED_LIBRARIES ole32)
- CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBOLE32)
- SET(CMAKE_REQUIRED_LIBRARIES "")
-# CHECK_LIBRARY_EXISTS(ole32 CoInitialize "" HAVE_LIBOLE32)
- IF(HAVE_LIBOLE32)
- SET(EXTRA_LIBS ole32 ${EXTRA_LIBS})
- ENDIF()
-
IF(DSOUND)
CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H)
IF(HAVE_DSOUND_H)
@@ -262,11 +254,6 @@ IF(HAVE_WINDOWS_H)
SET(ALC_OBJS ${ALC_OBJS} Alc/dsound.c)
SET(BACKENDS "${BACKENDS} DirectSound,")
- CHECK_LIBRARY_EXISTS(dxguid IID_IDirectSound "" HAVE_LIBDXGUID)
- IF(HAVE_LIBDXGUID)
- SET(EXTRA_LIBS dxguid ${EXTRA_LIBS})
- ENDIF()
-
SET(CMAKE_REQUIRED_LIBRARIES dsound)
CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBDSOUND)
SET(CMAKE_REQUIRED_LIBRARIES "")