Fix the BlockSize check.

This commit is contained in:
Francois Gouget 2003-01-07 19:43:02 +00:00 committed by Alexandre Julliard
parent f53ddb2618
commit 772cabeba9
1 changed files with 2 additions and 2 deletions

View File

@ -1450,9 +1450,9 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
lpWaveHdr->dwFlags |= WHDR_INQUEUE;
lpWaveHdr->lpNext = 0;
if ((lpWaveHdr->dwBufferLength & ~(WOutDev[wDevID].format.wf.nBlockAlign - 1)) != 0)
if ((lpWaveHdr->dwBufferLength & (WOutDev[wDevID].format.wf.nBlockAlign - 1)) != 0)
{
WARN("WaveHdr length isn't a multiple of the PCM block size\n");
WARN("WaveHdr length isn't a multiple of the PCM block size: %ld %% %d\n",lpWaveHdr->dwBufferLength,WOutDev[wDevID].format.wf.nBlockAlign);
lpWaveHdr->dwBufferLength &= ~(WOutDev[wDevID].format.wf.nBlockAlign - 1);
}