small cleanup and bugfix
Modified: trunk/reactos/lib/mmdrv/wave.c
_____
Modified: trunk/reactos/lib/mmdrv/wave.c
--- trunk/reactos/lib/mmdrv/wave.c 2005-11-21 22:05:22 UTC (rev
19429)
+++ trunk/reactos/lib/mmdrv/wave.c 2005-11-21 22:16:31 UTC (rev
19430)
@@ -684,14 +684,6 @@
}
-
-
-//FIXME: Params are MS-specific
-static MMRESULT WriteWaveDevice(LPWAVEHDR pHdr, PWAVEALLOC pClient)
-{
- return MMSYSERR_NOERROR;
-}
-
//FIXME: MS-specific code, except for name of the func!
MMRESULT GetPositionWaveDevice(PWAVEALLOC pClient, LPMMTIME lpmmt,
DWORD dwSize)
{
@@ -728,7 +720,6 @@
-//FIXME: Params are MS-specific
MMRESULT soundSetData(UINT DeviceType, UINT DeviceId, UINT Length,
PBYTE Data,
ULONG Ioctl)
{
@@ -746,6 +737,7 @@
return Result;
}
+
MMRESULT soundGetData(UINT DeviceType, UINT DeviceId, UINT Length,
PBYTE Data,
ULONG Ioctl)
{
@@ -855,7 +847,15 @@
// save WAVEALLOC pointer in the
WaveHeader
pWaveHdr->reserved = dwUser;
- return WriteWaveDevice(pWaveHdr,
(PWAVEALLOC)dwUser);
+
+ pWaveHdr->dwFlags |= WHDR_INQUEUE;
+ pWaveHdr->dwFlags &= ~WHDR_DONE;
+ pTask->AuxParam.pHdr = pWaveHdr;
+
+ pTask->AuxFunction = WaveThreadAddBuffer;
+ SetEvent(pTask->AuxEvent1);
+ WaitForSingleObject(pTask->AuxEvent2, INFINITE);
+ return pTask->AuxReturnCode;
}
case WODM_PAUSE:
Show replies by date