implement addbuffer to waveTheard. it can play wave one time if it is
same file in windows
Modified: trunk/reactos/lib/mmdrv/wave.c
_____
Modified: trunk/reactos/lib/mmdrv/wave.c
--- trunk/reactos/lib/mmdrv/wave.c 2005-11-25 18:05:42 UTC (rev
19564)
+++ trunk/reactos/lib/mmdrv/wave.c 2005-11-25 18:21:42 UTC (rev
19565)
@@ -91,9 +91,31 @@
switch (pClient->AuxFunction)
{
case WaveThreadAddBuffer:
- DPRINT("UNIMPLMENENT WaveThreadAddBuffer ");
+ LPWAVEHDR *pHdrSearching;
+
+ if (pClient->DeviceType == WaveInDevice)
+ pClient->AuxParam.pHdr->dwBytesRecorded = 0;
+
+ pHdrSearching = &pClient->DeviceQueue;
+ pClient->AuxParam.pHdr->lpNext = NULL;
+
+ while (*pHdrSearching)
+ {
+ pHdrSearching = &(*pHdrSearching)->lpNext;
+ }
+
+ if (pClient->NextBuffer == NULL)
+ {
+ pClient->BufferPosition = 0;
+ pClient->NextBuffer = pClient->AuxParam.pHdr;
+
+ }
+
+ *pHdrSearching = pClient->AuxParam.pHdr;
+
+ pClient->AuxReturnCode = waveStart(pClient);
break;
-
+
case WaveThreadSetState:
pClient->AuxReturnCode = waveSetState(pClient,
pClient->AuxParam.State);
@@ -549,7 +571,7 @@
BOOL Result;
DWORD BytesReturned;
LPWAVEFORMATEX pFormats;
- PWAVEALLOC *pUserHandle = &pClient;
+ PWAVEALLOC *pUserHandle = NULL;
HANDLE hDevice;
pFormats = (LPWAVEFORMATEX)((LPWAVEOPENDESC)dwParam1)->lpFormat;
Show replies by date