aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/mmdevapi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-18 13:08:54 -0800
committerChris Robinson <[email protected]>2012-02-18 13:08:54 -0800
commitbbc679a5db2e000c8638295d58ce97df2695b6c5 (patch)
tree087b9ad8640a3cda88a38c52f764a66084894fe1 /Alc/backends/mmdevapi.c
parent592fb2b9133a5cccb2920894392a3fd341751827 (diff)
Minor MMDevApi cleanups
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r--Alc/backends/mmdevapi.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 9eb5cfc5..c4679f85 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -210,9 +210,9 @@ static DevMap *ProbeDevices(IMMDeviceEnumerator *devenum, EDataFlow flowdir, ALu
{
IMMDeviceCollection *coll;
IMMDevice *defdev = NULL;
- DevMap *devlist;
- UINT count;
+ DevMap *devlist = NULL;
HRESULT hr;
+ UINT count;
UINT idx;
UINT i;
@@ -337,7 +337,7 @@ static ALCboolean MakeExtensible(WAVEFORMATEXTENSIBLE *out, const WAVEFORMATEX *
{
memset(out, 0, sizeof(*out));
if(in->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
- *out = *(WAVEFORMATEXTENSIBLE*)in;
+ *out = *(const WAVEFORMATEXTENSIBLE*)in;
else if(in->wFormatTag == WAVE_FORMAT_PCM)
{
out->Format = *in;
@@ -982,7 +982,7 @@ void alcMMDevApiDeinit(void)
void alcMMDevApiProbe(enum DevProbe type)
{
- ThreadRequest req;
+ ThreadRequest req = { NULL, 0 };
HRESULT hr = E_FAIL;
switch(type)
@@ -1006,11 +1006,12 @@ void alcMMDevApiProbe(enum DevProbe type)
AppendAllDeviceList(PlaybackDeviceList[i].name);
}
}
- if(req.FinishedEvt != NULL)
- CloseHandle(req.FinishedEvt);
break;
case CAPTURE_DEVICE_PROBE:
break;
}
+ if(req.FinishedEvt != NULL)
+ CloseHandle(req.FinishedEvt);
+ req.FinishedEvt = NULL;
}