RFC - msacm32: Quit on unsupported destination format in PCM_FormatSuggest
Bruno Jesus
00cpxxx at gmail.com
Sun Sep 6 22:33:09 CDT 2015
Since this DLL is far away from my comprehension I'm first sending
this to wine-devel.
Current code [1] suggest that only WAVE_FORMAT_PCM is supported so do
not allow the function to succeed if the destination format is not
PCM.
Fixes bug https://bugs.winehq.org/show_bug.cgi?id=14193
[1]
858 if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) {
859 if (adfs->pwfxSrc->wFormatTag != WAVE_FORMAT_PCM) {
860 WARN("not possible\n");
861 return ACMERR_NOTPOSSIBLE;
862 }
863 adfs->pwfxDst->wFormatTag = adfs->pwfxSrc->wFormatTag;
864 }
-------------- next part --------------
diff --git a/dlls/msacm32/pcmconverter.c b/dlls/msacm32/pcmconverter.c
index cf92d93..fc255f1 100644
--- a/dlls/msacm32/pcmconverter.c
+++ b/dlls/msacm32/pcmconverter.c
@@ -857,11 +857,18 @@ static LRESULT PCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
}
if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) {
if (adfs->pwfxSrc->wFormatTag != WAVE_FORMAT_PCM) {
- WARN("not possible\n");
+ WARN("source format 0x%x not supported\n", adfs->pwfxSrc->wFormatTag);
return ACMERR_NOTPOSSIBLE;
}
adfs->pwfxDst->wFormatTag = adfs->pwfxSrc->wFormatTag;
}
+ else
+ {
+ if (adfs->pwfxDst->wFormatTag != WAVE_FORMAT_PCM) {
+ WARN("destination format 0x%x not supported\n", adfs->pwfxDst->wFormatTag);
+ return ACMERR_NOTPOSSIBLE;
+ }
+ }
/* check if result is ok */
if (PCM_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) {
WARN("not possible\n");
More information about the wine-devel
mailing list