msacm32: Reduce block align condition scope to test covered drivers.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2017-01-17 14:48:02 -02:00 committed by Alexandre Julliard
parent 02574e1d9d
commit 0afcefd338
1 changed files with 3 additions and 1 deletions

View File

@ -317,7 +317,9 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
WARN("invalid use of reserved parameter\n");
return MMSYSERR_INVALFLAG;
}
if (pash->cbSrcLength < was->drvInst.pwfxSrc->nBlockAlign) {
if ((was->drvInst.pwfxSrc->wFormatTag == WAVE_FORMAT_ADPCM ||
was->drvInst.pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) &&
pash->cbSrcLength < was->drvInst.pwfxSrc->nBlockAlign) {
WARN("source smaller than block align (%d < %d)\n",
pash->cbSrcLength, was->drvInst.pwfxSrc->nBlockAlign);
return pash->cbSrcLength ? ACMERR_NOTPOSSIBLE : MMSYSERR_INVALPARAM;