From: Zebediah Figura Subject: [PATCH 09/12] msgsm32.acm: Remove unnecessary checks. Message-Id: <20170606201501.6502-9-z.figura12@gmail.com> Date: Tue, 6 Jun 2017 15:14:58 -0500 In-Reply-To: <20170606201501.6502-1-z.figura12@gmail.com> References: <20170606201501.6502-1-z.figura12@gmail.com> These are already checked in msacm32 or not checked on Windows. Signed-off-by: Zebediah Figura --- dlls/msgsm32.acm/msgsm32.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/msgsm32.acm/msgsm32.c b/dlls/msgsm32.acm/msgsm32.c index cce1303455..de852bc90a 100644 --- a/dlls/msgsm32.acm/msgsm32.c +++ b/dlls/msgsm32.acm/msgsm32.c @@ -270,7 +270,6 @@ static LRESULT GSM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery) switch (afd->dwFormatTag) { case WAVE_FORMAT_PCM: - if (afd->dwFormatIndex >= NUM_RATES) return ACMERR_NOTPOSSIBLE; afd->pwfx->nChannels = 1; afd->pwfx->nSamplesPerSec = gsm_rates[afd->dwFormatIndex]; afd->pwfx->wBitsPerSample = 16; @@ -278,7 +277,6 @@ static LRESULT GSM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery) afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign; break; case WAVE_FORMAT_GSM610: - if (afd->dwFormatIndex >= NUM_RATES) return ACMERR_NOTPOSSIBLE; afd->pwfx->nChannels = 1; afd->pwfx->nSamplesPerSec = gsm_rates[afd->dwFormatIndex]; afd->pwfx->wBitsPerSample = 0; @@ -309,10 +307,8 @@ static LRESULT GSM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery) static LRESULT GSM_FormatSuggest(PACMDRVFORMATSUGGEST adfs) { /* some tests ... */ - if (adfs->cbwfxSrc < sizeof(PCMWAVEFORMAT) || - adfs->cbwfxDst < sizeof(PCMWAVEFORMAT) || + if (adfs->pwfxSrc->wFormatTag == adfs->pwfxDst->wFormatTag || !GSM_FormatValidate(adfs->pwfxSrc)) return ACMERR_NOTPOSSIBLE; - /* FIXME: should do those tests against the real size (according to format tag */ /* If no suggestion for destination, then copy source value */ if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NCHANNELS)) -- 2.13.0