Fall back to default prepare/unprepare header functions.
This commit is contained in:
parent
1e17a784c6
commit
2b3aa7c5be
|
@ -1895,47 +1895,6 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPrepare [internal]
|
||||
*/
|
||||
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodUnprepare [internal]
|
||||
*/
|
||||
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPause [internal]
|
||||
*/
|
||||
|
@ -2191,8 +2150,8 @@ DWORD WINAPI ALSA_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WODM_PAUSE: return wodPause (wDevID);
|
||||
case WODM_GETPOS: return wodGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
case WODM_BREAKLOOP: return wodBreakLoop (wDevID);
|
||||
case WODM_PREPARE: return wodPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_UNPREPARE: return wodUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_GETVOLUME: return wodGetVolume (wDevID, (LPDWORD)dwParam1);
|
||||
case WODM_SETVOLUME: return wodSetVolume (wDevID, dwParam1);
|
||||
case WODM_RESTART: return wodRestart (wDevID);
|
||||
|
@ -3405,47 +3364,6 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widPrepare [internal]
|
||||
*/
|
||||
static DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEINDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widUnprepare [internal]
|
||||
*/
|
||||
static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEINDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widStart [internal]
|
||||
*
|
||||
|
@ -3601,8 +3519,8 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WIDM_OPEN: return widOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
||||
case WIDM_CLOSE: return widClose (wDevID);
|
||||
case WIDM_ADDBUFFER: return widAddBuffer (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return widPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_UNPREPARE: return widUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEOUTCAPSW)dwParam1, dwParam2);
|
||||
case WIDM_GETNUMDEVS: return widGetNumDevs ();
|
||||
case WIDM_GETPOS: return widGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
|
|
|
@ -1301,47 +1301,6 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPrepare [internal]
|
||||
*/
|
||||
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodUnprepare [internal]
|
||||
*/
|
||||
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPause [internal]
|
||||
*/
|
||||
|
@ -1543,8 +1502,8 @@ DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WODM_PAUSE: return wodPause (wDevID);
|
||||
case WODM_GETPOS: return wodGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
case WODM_BREAKLOOP: return wodBreakLoop (wDevID);
|
||||
case WODM_PREPARE: return wodPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_UNPREPARE: return wodUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_GETDEVCAPS: return wodGetDevCaps (wDevID, (LPWAVEOUTCAPSW)dwParam1, dwParam2);
|
||||
case WODM_GETNUMDEVS: return wodGetNumDevs ();
|
||||
case WODM_GETPITCH: return MMSYSERR_NOTSUPPORTED;
|
||||
|
@ -1972,47 +1931,6 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widPrepare [internal]
|
||||
*/
|
||||
static DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEINDRV) return MMSYSERR_INVALHANDLE;
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
lpWaveHdr->dwBytesRecorded = 0;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widUnprepare [internal]
|
||||
*/
|
||||
static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (wDevID >= MAX_WAVEINDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_INVALHANDLE;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE) {
|
||||
TRACE("Still playing...\n");
|
||||
return WAVERR_STILLPLAYING;
|
||||
}
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widStart [internal]
|
||||
*/
|
||||
|
@ -2076,8 +1994,8 @@ DWORD WINAPI ARTS_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WIDM_OPEN: return widOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
||||
case WIDM_CLOSE: return widClose (wDevID);
|
||||
case WIDM_ADDBUFFER: return widAddBuffer (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return widPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_UNPREPARE: return widUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEINCAPSW)dwParam1, dwParam2);
|
||||
case WIDM_GETNUMDEVS: return widGetNumDevs ();
|
||||
case WIDM_RESET: return widReset (wDevID);
|
||||
|
|
|
@ -990,47 +990,6 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPrepare [internal]
|
||||
*/
|
||||
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodUnprepare [internal]
|
||||
*/
|
||||
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPause [internal]
|
||||
*/
|
||||
|
@ -1220,8 +1179,8 @@ DWORD WINAPI LIBAUDIOIO_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WODM_PAUSE: return wodPause (wDevID);
|
||||
case WODM_GETPOS: return wodGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
case WODM_BREAKLOOP: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_PREPARE: return wodPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_UNPREPARE: return wodUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_GETDEVCAPS: return wodGetDevCaps (wDevID, (LPWAVEOUTCAPSW)dwParam1, dwParam2);
|
||||
case WODM_GETNUMDEVS: return wodGetNumDevs ();
|
||||
case WODM_GETPITCH: return MMSYSERR_NOTSUPPORTED;
|
||||
|
@ -2091,42 +2050,6 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widPrepare [internal]
|
||||
*/
|
||||
static DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEINDRV) return MMSYSERR_INVALHANDLE;
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~(WHDR_INQUEUE|WHDR_DONE);
|
||||
lpWaveHdr->dwBytesRecorded = 0;
|
||||
TRACE("header prepared !\n");
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widUnprepare [internal]
|
||||
*/
|
||||
static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (wDevID >= MAX_WAVEINDRV) return MMSYSERR_INVALHANDLE;
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~(WHDR_PREPARED|WHDR_INQUEUE);
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widStart [internal]
|
||||
*/
|
||||
|
@ -2214,8 +2137,8 @@ DWORD WINAPI LIBAUDIOIO_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
case WIDM_OPEN: return widOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
||||
case WIDM_CLOSE: return widClose (wDevID);
|
||||
case WIDM_ADDBUFFER: return widAddBuffer (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return widPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_UNPREPARE: return widUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEINCAPSW)dwParam1, dwParam2);
|
||||
case WIDM_GETNUMDEVS: return wodGetNumDevs (); /* same number of devices in output as in input */
|
||||
case WIDM_GETPOS: return widGetPosition(wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
|
|
|
@ -1456,49 +1456,6 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPrepare [internal]
|
||||
*/
|
||||
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV)
|
||||
{
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodUnprepare [internal]
|
||||
*/
|
||||
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV)
|
||||
{
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPause [internal]
|
||||
*/
|
||||
|
@ -1728,8 +1685,8 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WODM_PAUSE: return wodPause(wDevID);
|
||||
case WODM_GETPOS: return wodGetPosition(wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
case WODM_BREAKLOOP: return wodBreakLoop(wDevID);
|
||||
case WODM_PREPARE: return wodPrepare(wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_UNPREPARE: return wodUnprepare(wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_GETDEVCAPS: return wodGetDevCaps(wDevID, (LPWAVEOUTCAPSW)dwParam1, dwParam2);
|
||||
case WODM_GETNUMDEVS: return wodGetNumDevs();
|
||||
case WODM_GETPITCH: return MMSYSERR_NOTSUPPORTED;
|
||||
|
@ -2287,48 +2244,6 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widPrepare [internal]
|
||||
*/
|
||||
static DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEINDRV) return MMSYSERR_INVALHANDLE;
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
lpWaveHdr->dwBytesRecorded = 0;
|
||||
lpWaveHdr->lpNext = NULL;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widUnprepare [internal]
|
||||
*/
|
||||
static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (wDevID >= MAX_WAVEINDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_INVALHANDLE;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE) {
|
||||
TRACE("Still playing...\n");
|
||||
return WAVERR_STILLPLAYING;
|
||||
}
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* widStart [internal]
|
||||
*/
|
||||
|
@ -2463,8 +2378,8 @@ DWORD WINAPI JACK_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
case WIDM_OPEN: return widOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
||||
case WIDM_CLOSE: return widClose (wDevID);
|
||||
case WIDM_ADDBUFFER: return widAddBuffer (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return widPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_UNPREPARE: return widUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WIDM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEINCAPSW)dwParam1, dwParam2);
|
||||
case WIDM_GETNUMDEVS: return widGetNumDevs();
|
||||
case WIDM_RESET: return widReset (wDevID);
|
||||
|
|
|
@ -1046,47 +1046,6 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPrepare [internal]
|
||||
*/
|
||||
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodUnprepare [internal]
|
||||
*/
|
||||
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
||||
|
||||
if (wDevID >= MAX_WAVEOUTDRV) {
|
||||
WARN("bad device ID !\n");
|
||||
return MMSYSERR_BADDEVICEID;
|
||||
}
|
||||
|
||||
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
||||
return WAVERR_STILLPLAYING;
|
||||
|
||||
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodPause [internal]
|
||||
*/
|
||||
|
@ -1256,8 +1215,8 @@ DWORD WINAPI NAS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
|||
case WODM_PAUSE: return wodPause (wDevID);
|
||||
case WODM_GETPOS: return wodGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
||||
case WODM_BREAKLOOP: return wodBreakLoop (wDevID);
|
||||
case WODM_PREPARE: return wodPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_UNPREPARE: return wodUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
||||
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
||||
case WODM_GETDEVCAPS: return wodGetDevCaps (wDevID, (LPWAVEOUTCAPSW)dwParam1, dwParam2);
|
||||
case WODM_GETNUMDEVS: return wodGetNumDevs ();
|
||||
case WODM_GETPITCH: return MMSYSERR_NOTSUPPORTED;
|
||||
|
|
Loading…
Reference in New Issue