summaryrefslogtreecommitdiffstats
path: root/Alc/dsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-18 00:13:43 -0700
committerChris Robinson <[email protected]>2011-08-18 00:13:43 -0700
commitd976d0293694e1cdab4f46fae5f14463995831c4 (patch)
tree0a25bc68c5a5c1f0a6931ce446a15747f3ececac /Alc/dsound.c
parent45f0886eba19c99a51a62e124d4b741bb0f1c09d (diff)
Only attempt to load MMDevApi and DSound once, on init
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r--Alc/dsound.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 7f1524eb..be111d1d 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -273,9 +273,6 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
LPGUID guid = NULL;
HRESULT hr;
- if(!DSoundLoad())
- return ALC_FALSE;
-
if(!deviceName)
deviceName = dsDevice;
else if(strcmp(deviceName, dsDevice) != 0)
@@ -612,6 +609,8 @@ static const BackendFuncs DSoundFuncs = {
ALCboolean alcDSoundInit(BackendFuncs *FuncList)
{
+ if(!DSoundLoad())
+ return ALC_FALSE;
*FuncList = DSoundFuncs;
return ALC_TRUE;
}
@@ -636,8 +635,6 @@ void alcDSoundProbe(enum DevProbe type)
HRESULT hr;
ALuint i;
- if(!DSoundLoad()) return;
-
switch(type)
{
case DEVICE_PROBE: