https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d4bc0feb6e082b1d013d1…
commit d4bc0feb6e082b1d013d1e3c3fa74b22db234c37
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Oct 1 12:52:44 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Mon Oct 1 12:52:44 2018 +0100
[IMAADP32.ACM] Sync with Wine Staging 3.17. CORE-15127
---
dll/win32/imaadp32.acm/imaadp32.c | 15 ++++++---------
media/doc/README.WINE | 2 +-
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/dll/win32/imaadp32.acm/imaadp32.c b/dll/win32/imaadp32.acm/imaadp32.c
index 474f548582..9518adc345 100644
--- a/dll/win32/imaadp32.acm/imaadp32.c
+++ b/dll/win32/imaadp32.acm/imaadp32.c
@@ -79,9 +79,6 @@ static const Format ADPCM_Formats[] =
{1, 4, 22050}, {2, 4, 22050}, {1, 4, 44100}, {2, 4, 44100},
};
-#define NUM_PCM_FORMATS (sizeof(PCM_Formats) / sizeof(PCM_Formats[0]))
-#define NUM_ADPCM_FORMATS (sizeof(ADPCM_Formats) / sizeof(ADPCM_Formats[0]))
-
/***********************************************************************
* ADPCM_GetFormatIndex
*/
@@ -93,11 +90,11 @@ static DWORD ADPCM_GetFormatIndex(const WAVEFORMATEX *wfx)
switch (wfx->wFormatTag)
{
case WAVE_FORMAT_PCM:
- hi = NUM_PCM_FORMATS;
+ hi = ARRAY_SIZE(PCM_Formats);
fmts = PCM_Formats;
break;
case WAVE_FORMAT_IMA_ADPCM:
- hi = NUM_ADPCM_FORMATS;
+ hi = ARRAY_SIZE(ADPCM_Formats);
fmts = ADPCM_Formats;
break;
default:
@@ -585,13 +582,13 @@ static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd,
DWORD dwQuery)
case 0:
aftd->dwFormatTag = WAVE_FORMAT_PCM;
aftd->cbFormatSize = sizeof(PCMWAVEFORMAT);
- aftd->cStandardFormats = NUM_PCM_FORMATS;
+ aftd->cStandardFormats = ARRAY_SIZE(PCM_Formats);
lstrcpyW(aftd->szFormatTag, szPcm);
break;
case 1:
aftd->dwFormatTag = WAVE_FORMAT_IMA_ADPCM;
aftd->cbFormatSize = sizeof(IMAADPCMWAVEFORMAT);
- aftd->cStandardFormats = NUM_ADPCM_FORMATS;
+ aftd->cStandardFormats = ARRAY_SIZE(ADPCM_Formats);
lstrcpyW(aftd->szFormatTag, szImaAdPcm);
break;
}
@@ -614,7 +611,7 @@ static LRESULT ADPCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD
dwQuery)
switch (afd->dwFormatTag)
{
case WAVE_FORMAT_PCM:
- if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
+ if (afd->dwFormatIndex >= ARRAY_SIZE(PCM_Formats)) return ACMERR_NOTPOSSIBLE;
afd->pwfx->nChannels = PCM_Formats[afd->dwFormatIndex].nChannels;
afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
@@ -627,7 +624,7 @@ static LRESULT ADPCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD
dwQuery)
afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
break;
case WAVE_FORMAT_IMA_ADPCM:
- if (afd->dwFormatIndex >= NUM_ADPCM_FORMATS) return ACMERR_NOTPOSSIBLE;
+ if (afd->dwFormatIndex >= ARRAY_SIZE(ADPCM_Formats)) return
ACMERR_NOTPOSSIBLE;
afd->pwfx->nChannels = ADPCM_Formats[afd->dwFormatIndex].nChannels;
afd->pwfx->nSamplesPerSec = ADPCM_Formats[afd->dwFormatIndex].rate;
afd->pwfx->wBitsPerSample = ADPCM_Formats[afd->dwFormatIndex].nBits;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 5ab6bf344f..0583308dba 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -75,7 +75,7 @@ reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9
reactos/dll/win32/httpapi # Synced to WineStaging-3.3
reactos/dll/win32/iccvid # Synced to WineStaging-3.3
reactos/dll/win32/ieframe # Synced to WineStaging-3.17
-reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.3
+reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17
reactos/dll/win32/imagehlp # Synced to WineStaging-3.3
reactos/dll/win32/imm32 # Synced to WineStaging-3.9
reactos/dll/win32/inetcomm # Synced to WineStaging-3.3