From b7d766d94c9f2340a8a359a0cc7dae4b0408afec Mon Sep 17 00:00:00 2001 From: Stefano Guidoni Date: Fri, 27 Feb 2009 20:11:04 +0100 Subject: [PATCH] imaadp32: Support for non-standard formats. --- dlls/imaadp32.acm/imaadp32.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dlls/imaadp32.acm/imaadp32.c b/dlls/imaadp32.acm/imaadp32.c index 9ad577ea2db..6174c8521f0 100644 --- a/dlls/imaadp32.acm/imaadp32.c +++ b/dlls/imaadp32.acm/imaadp32.c @@ -120,6 +120,25 @@ static DWORD ADPCM_GetFormatIndex(const WAVEFORMATEX *wfx) return i; } + switch (wfx->wFormatTag) + { + case WAVE_FORMAT_PCM: + if(3 > wfx->nChannels && + wfx->nChannels > 0 && + wfx->nAvgBytesPerSec == 2 * wfx->nSamplesPerSec * wfx->nChannels && + wfx->nBlockAlign == 2 * wfx->nChannels && + wfx->wBitsPerSample == 16) + return hi; + break; + case WAVE_FORMAT_IMA_ADPCM: + if(3 > wfx->nChannels && + wfx->nChannels > 0 && + wfx->wBitsPerSample == 4 && + wfx->cbSize == 2) + return hi; + break; + } + return 0xFFFFFFFF; }