Author: janderwald Date: Thu Feb 24 14:38:16 2011 New Revision: 50894
URL: http://svn.reactos.org/svn/reactos?rev=50894&view=rev Log: [WDMAUD.DRV] - Set wave in pins into run state - Fixes hang of ReactOS sndrec32, though it crashes then instantly. Needs more investigation
Modified: trunk/reactos/dll/win32/wdmaud.drv/legacy.c
Modified: trunk/reactos/dll/win32/wdmaud.drv/legacy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/legacy... ============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] Thu Feb 24 14:38:16 2011 @@ -528,18 +528,18 @@ Instance->BufferCount = 100; }
- if (DeviceType == WAVE_OUT_DEVICE_TYPE) - { - /* Now start the stream */ - DeviceInfo.u.State = KSSTATE_RUN; - SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_SETDEVICE_STATE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - } + /* Now acquire resources */ + DeviceInfo.u.State = KSSTATE_ACQUIRE; + SyncOverlappedDeviceIoControl(KernelHandle, IOCTL_SETDEVICE_STATE, (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), NULL); + + /* pause the pin */ + DeviceInfo.u.State = KSSTATE_PAUSE; + SyncOverlappedDeviceIoControl(KernelHandle, IOCTL_SETDEVICE_STATE, (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), NULL); + + /* start the pin */ + DeviceInfo.u.State = KSSTATE_RUN; + SyncOverlappedDeviceIoControl(KernelHandle, IOCTL_SETDEVICE_STATE, (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), (LPVOID) &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO), NULL); +
return MMSYSERR_NOERROR; }