[IMAADP32.ACM] Sync with Wine Staging 3.17. CORE-15127
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Oct 2018 11:52:44 +0000 (12:52 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Oct 2018 11:52:44 +0000 (12:52 +0100)
dll/win32/imaadp32.acm/imaadp32.c
media/doc/README.WINE

index 474f548..9518adc 100644 (file)
@@ -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;
index 5ab6bf3..0583308 100644 (file)
@@ -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