msadp32: MSDN suggests "wfx.nBlockAlign * 2 / wfx.nChannels - 12" as the formula for calculating wSamplesPerBlock.

This commit is contained in:
Stefano Guidoni 2009-02-09 22:06:30 +01:00 committed by Alexandre Julliard
parent 279e797cb2
commit d6ae9f8800
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ static void init_wfx_adpcm(ADPCMWAVEFORMAT* awfx)
pwfx->cbSize = 2 * sizeof(WORD) + 7 * sizeof(ADPCMCOEFSET);
/* 7 is the size of the block head (which contains two samples) */
awfx->wSamplesPerBlock = (pwfx->nBlockAlign - (7 * pwfx->nChannels)) * (2 / pwfx->nChannels) + 2;
awfx->wSamplesPerBlock = pwfx->nBlockAlign * 2 / pwfx->nChannels - 12;
pwfx->nAvgBytesPerSec = (pwfx->nSamplesPerSec * pwfx->nBlockAlign) / awfx->wSamplesPerBlock;
awfx->wNumCoef = 7;
memcpy(awfx->aCoef, MSADPCM_CoeffSet, 7 * sizeof(ADPCMCOEFSET));