mciwave: Set wave format PCM is the only one accepted.
This commit is contained in:
parent
f177e61338
commit
518f4f8cdb
|
@ -1310,6 +1310,11 @@ static DWORD WAVE_mciSet(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpPa
|
|||
TRACE("MCI_WAVE_SET_ANYINPUT !\n");
|
||||
if (dwFlags & MCI_WAVE_SET_ANYOUTPUT)
|
||||
TRACE("MCI_WAVE_SET_ANYOUTPUT !\n");
|
||||
if (dwFlags & MCI_WAVE_SET_FORMATTAG) {
|
||||
TRACE("MCI_WAVE_SET_FORMATTAG = %d\n", ((LPMCI_WAVE_SET_PARMS)lpParms)->wFormatTag);
|
||||
if (((LPMCI_WAVE_SET_PARMS)lpParms)->wFormatTag != WAVE_FORMAT_PCM)
|
||||
return MCIERR_OUTOFRANGE;
|
||||
}
|
||||
if (dwFlags & MCI_WAVE_SET_AVGBYTESPERSEC) {
|
||||
wmw->wfxRef.nAvgBytesPerSec = ((LPMCI_WAVE_SET_PARMS)lpParms)->nAvgBytesPerSec;
|
||||
TRACE("MCI_WAVE_SET_AVGBYTESPERSEC = %d\n", wmw->wfxRef.nAvgBytesPerSec);
|
||||
|
@ -1326,11 +1331,6 @@ static DWORD WAVE_mciSet(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpPa
|
|||
wmw->wfxRef.nChannels = ((LPMCI_WAVE_SET_PARMS)lpParms)->nChannels;
|
||||
TRACE("MCI_WAVE_SET_CHANNELS = %d\n", wmw->wfxRef.nChannels);
|
||||
}
|
||||
if (dwFlags & MCI_WAVE_SET_FORMATTAG) {
|
||||
/* Dangerous because the correct cbSize cannot be set */
|
||||
wmw->wfxRef.wFormatTag = ((LPMCI_WAVE_SET_PARMS)lpParms)->wFormatTag;
|
||||
TRACE("MCI_WAVE_SET_FORMATTAG = %d\n", wmw->wfxRef.wFormatTag);
|
||||
}
|
||||
if (dwFlags & MCI_WAVE_SET_SAMPLESPERSEC) {
|
||||
wmw->wfxRef.nSamplesPerSec = ((LPMCI_WAVE_SET_PARMS)lpParms)->nSamplesPerSec;
|
||||
TRACE("MCI_WAVE_SET_SAMPLESPERSEC = %d\n", wmw->wfxRef.nSamplesPerSec);
|
||||
|
|
|
@ -233,7 +233,7 @@ static void test_recordWAVE(HWND hwnd)
|
|||
|
||||
/* MCI seems to solely support PCM, no need for ACM conversion. */
|
||||
err = mciSendString("set x format tag 2", NULL, 0, NULL);
|
||||
todo_wine ok(err==MCIERR_OUTOFRANGE,"mci set format tag 2 returned error: %d\n", err);
|
||||
ok(err==MCIERR_OUTOFRANGE,"mci set format tag 2 returned error: %d\n", err);
|
||||
|
||||
err = mciSendString("set x format tag pcm", NULL, 0, NULL);
|
||||
ok(!err,"mci set format tag pcm returned error: %d\n", err);
|
||||
|
|
Loading…
Reference in New Issue