https://git.reactos.org/?p=reactos.git;a=commitdiff;h=611eb5508c9e0d1f5f5c8…
commit 611eb5508c9e0d1f5f5c819208d8cba0532139a2
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Dec 7 13:05:25 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Dec 7 13:05:25 2019 +0100
[WINEMP3.ACM] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/winemp3.acm/mpegl3.c | 19 ++++++++-----------
media/doc/README.WINE | 2 +-
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/dll/win32/winemp3.acm/mpegl3.c b/dll/win32/winemp3.acm/mpegl3.c
index b28519f835a..2e929371ae8 100644
--- a/dll/win32/winemp3.acm/mpegl3.c
+++ b/dll/win32/winemp3.acm/mpegl3.c
@@ -89,9 +89,6 @@ static const Format MPEG3_Formats[] =
{1, 0, 48000}, {2, 0, 48000}
};
-#define NUM_PCM_FORMATS (sizeof(PCM_Formats) / sizeof(PCM_Formats[0]))
-#define NUM_MPEG3_FORMATS (sizeof(MPEG3_Formats) / sizeof(MPEG3_Formats[0]))
-
/***********************************************************************
* MPEG3_GetFormatIndex
*/
@@ -103,12 +100,12 @@ static DWORD MPEG3_GetFormatIndex(LPWAVEFORMATEX wfx)
switch (wfx->wFormatTag)
{
case WAVE_FORMAT_PCM:
- hi = NUM_PCM_FORMATS;
+ hi = ARRAY_SIZE(PCM_Formats);
fmts = PCM_Formats;
break;
case WAVE_FORMAT_MPEG:
case WAVE_FORMAT_MPEGLAYER3:
- hi = NUM_MPEG3_FORMATS;
+ hi = ARRAY_SIZE(MPEG3_Formats);
fmts = MPEG3_Formats;
break;
default:
@@ -692,13 +689,13 @@ static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add)
add->cFilterTags = 0;
add->hicon = NULL;
MultiByteToWideChar( CP_ACP, 0, "MPEG Layer-3 Codec", -1,
- add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR)
);
+ add->szShortName, ARRAY_SIZE( add->szShortName ));
MultiByteToWideChar( CP_ACP, 0, "Wine MPEG3 decoder", -1,
- add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
+ add->szLongName, ARRAY_SIZE( add->szLongName ));
MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team...", -1,
- add->szCopyright, sizeof(add->szCopyright)/sizeof(WCHAR)
);
+ add->szCopyright, ARRAY_SIZE( add->szCopyright ));
MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
- add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR)
);
+ add->szLicensing, ARRAY_SIZE( add->szLicensing ));
add->szFeatures[0] = 0;
return MMSYSERR_NOERROR;
@@ -746,7 +743,7 @@ static LRESULT MPEG3_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:
@@ -781,7 +778,7 @@ static LRESULT MPEG3_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;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 876663af0de..7d41d927c6c 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -199,7 +199,7 @@ dll/win32/wbemdisp # Synced to WineStaging-4.18
dll/win32/wbemprox # Synced to WineStaging-4.18
dll/win32/windowscodecs # Synced to WineStaging-4.18
dll/win32/windowscodecsext # Synced to WineStaging-2.9
-dll/win32/winemp3.acm # Synced to WineStaging-3.3
+dll/win32/winemp3.acm # Synced to WineStaging-4.18
dll/win32/wing32 # Synced to WineStaging-3.3
dll/win32/winhttp # Synced to WineStaging-3.9
dll/win32/wininet # Synced to WineStaging-3.9