Stefano Guidoni : imaadp32: Support for non-standard formats.
Alexandre Julliard
julliard at winehq.org
Mon Mar 2 09:01:59 CST 2009
Module: wine
Branch: master
Commit: b7d766d94c9f2340a8a359a0cc7dae4b0408afec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7d766d94c9f2340a8a359a0cc7dae4b0408afec
Author: Stefano Guidoni <s.guidoni at tin.it>
Date: Fri Feb 27 20:11:04 2009 +0100
imaadp32: Support for non-standard formats.
---
dlls/imaadp32.acm/imaadp32.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/imaadp32.acm/imaadp32.c b/dlls/imaadp32.acm/imaadp32.c
index 9ad577e..6174c85 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;
}
More information about the wine-cvs
mailing list