Author: janderwald
Date: Mon Oct 17 19:03:01 2016
New Revision: 72979
URL:
http://svn.reactos.org/svn/reactos?rev=72979&view=rev
Log:
[WDMAUD]
- fix a bug in WdmAudControlDeviceType
- clear handle value when opening device interface key fails
Modified:
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Mon Oct 17
19:03:01 2016
@@ -55,11 +55,11 @@
}
else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
{
+ Result = WdmAudGetWaveOutDeviceCount();
+ }
+ else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
+ {
Result = WdmAudGetWaveInDeviceCount();
- }
- else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
- {
- Result = WdmAudGetWaveOutDeviceCount();
}
else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
{
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] Mon Oct 17
19:03:01 2016
@@ -271,6 +271,12 @@
/* open device interface key */
Status = IoOpenDeviceInterfaceRegistryKey(&KeyName, GENERIC_READ | GENERIC_WRITE,
OutKey);
+
+ if (!NT_SUCCESS(Status))
+ {
+ *OutKey = NULL;
+ }
+
#if 0
if (!NT_SUCCESS(Status))
{