Author: janderwald Date: Sun Dec 20 01:55:52 2009 New Revision: 44663
URL: http://svn.reactos.org/svn/reactos?rev=44663&view=rev Log: [WDMAUD.DRV] - Implement support of using mmixer wave in/out library functions (not yet used) - Not yet used - Remove DIGCF_PRESENT flag from device list as setupapi cannot handle this yet properly
Modified: trunk/reactos/dll/win32/wdmaud.drv/mmixer.c trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild
Modified: trunk/reactos/dll/win32/wdmaud.drv/mmixer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/mmixer... ============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] Sun Dec 20 01:55:52 2009 @@ -295,7 +295,7 @@ DeviceHandle = SetupDiGetClassDevs(&CategoryGuid, NULL, NULL, - DIGCF_DEVICEINTERFACE|DIGCF_PRESENT); + DIGCF_DEVICEINTERFACE/* FIXME |DIGCF_PRESENT*/);
if (DeviceHandle == INVALID_HANDLE_VALUE) { @@ -408,3 +408,54 @@
return MMSYSERR_ERROR; } + +ULONG +WdmAudGetWaveOutCount() +{ + return MMixerGetWaveOutCount(&MixerContext); +} + +ULONG +WdmAudGetWaveInCount() +{ + return MMixerGetWaveInCount(&MixerContext); +} + +MMRESULT +WdmAudGetWaveOutCapabilities( + IN ULONG DeviceId, + LPWAVEOUTCAPSW Capabilities) +{ + if (MMixerWaveOutCapabilities(&MixerContext, DeviceId, Capabilities) == MM_STATUS_SUCCESS) + return MMSYSERR_NOERROR; + + return MMSYSERR_ERROR; + +} + +MMRESULT +WdmAudGetWaveInCapabilities( + IN ULONG DeviceId, + LPWAVEINCAPSW Capabilities) +{ + if (MMixerWaveInCapabilities(&MixerContext, DeviceId, Capabilities) == MM_STATUS_SUCCESS) + return MMSYSERR_NOERROR; + + return MMSYSERR_ERROR; +} + +MMRESULT +WdmAudOpenWave( + OUT PHANDLE hPin, + IN DWORD DeviceId, + IN PWAVEFORMATEX WaveFormat, + IN DWORD bWaveIn) +{ + if (MMixerOpenWave(&MixerContext, DeviceId, bWaveIn, WaveFormat, hPin) == MM_STATUS_SUCCESS) + { + //fixme + // start stream if waveout + return MMSYSERR_NOERROR; + } + return MMSYSERR_ERROR; +}
Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmaud... ============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] Sun Dec 20 01:55:52 2009 @@ -44,7 +44,20 @@ { #ifdef USE_MMIXER_LIB
- *DeviceCount = WdmAudGetMixerCount(); + switch(DeviceType) + { + case MIXER_DEVICE_TYPE: + *DeviceCount = WdmAudGetMixerCount(); + break; + case WAVE_OUT_DEVICE_TYPE: + *DeviceCount = WdmAudGetWaveOutCount(); + break; + case WAVE_IN_DEVICE_TYPE: + *DeviceCount = WdmAudGetWaveInCount(); + break; + default: + *DeviceCount = 0; + } return MMSYSERR_NOERROR; #else
@@ -106,8 +119,17 @@ #ifdef USE_MMIXER_LIB if (DeviceType == MIXER_DEVICE_TYPE) { - return WdmAudGetMixerCapabilties(DeviceId, (LPMIXERCAPSW)Capabilities); - } + return WdmAudGetMixerCapabilities(DeviceId, (LPMIXERCAPSW)Capabilities); + } + else if (DeviceType == WAVE_OUT_DEVICE_TYPE) + { + return WdmAudGetWaveOutCapabilities(DeviceId, (LPWAVEOUTCAPSW)Capabilities); + } + else if (DeviceType == WAVE_IN_DEVICE_TYPE) + { + return WdmAudGetWaveInCapabilities(DeviceId, (LPWAVEINCAPSW)Capabilities); + } + #endif
@@ -459,8 +481,13 @@ return MMSYSERR_NOERROR; }
- Result = GetSoundDeviceType(SoundDevice, &DeviceType); + +#ifdef USE_MMIXER_LIB + return WdmAudOpenWavePin(Instance, DeviceId, WaveFormat, DeviceType); +#endif + + SND_ASSERT( Result == MMSYSERR_NOERROR );
ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO));
Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmaud... ============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h [iso-8859-1] Sun Dec 20 01:55:52 2009 @@ -18,12 +18,28 @@ WdmAudInitUserModeMixer();
ULONG +WdmAudGetWaveOutCount(); + +ULONG +WdmAudGetWaveInCount(); + +ULONG WdmAudGetMixerCount();
MMRESULT WdmAudGetMixerCapabilties( IN ULONG DeviceId, LPMIXERCAPSW Capabilities); + +MMRESULT +WdmAudGetWaveOutCapabilities( + IN ULONG DeviceId, + LPWAVEOUTCAPSW Capabilities); + +MMRESULT +WdmAudGetWaveInCapabilities( + IN ULONG DeviceId, + LPWAVEINCAPSW Capabilities);
MMRESULT WdmAudCloseMixer( @@ -35,6 +51,14 @@ IN PHANDLE hMixer, IN ULONG DeviceId, IN HANDLE hNotifyEvent); + +MMRESULT +WdmAudOpenWave( + OUT PHANDLE hPin, + IN DWORD DeviceId, + IN PWAVEFORMATEX WaveFormat, + IN DWORD bWaveIn); +
MMRESULT WdmAudGetLineInfo(
Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmaud... ============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild [iso-8859-1] Sun Dec 20 01:55:52 2009 @@ -16,6 +16,7 @@ <library>msvcrt</library> <library>mmixer</library> <library>setupapi</library> + <library>ksuser</library> <file>wdmaud.c</file> <file>mixer.c</file> <file>mmixer.c</file>