Commit d6ae9f88 authored by Stefano Guidoni's avatar Stefano Guidoni Committed by Alexandre Julliard

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

msadp32: MSDN suggests "wfx.nBlockAlign * 2 / wfx.nChannels - 12" as the formula for calculating wSamplesPerBlock.
parent 279e797c
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment