[PATCH 09/12] msgsm32.acm: Remove unnecessary checks.
Zebediah Figura
z.figura12 at gmail.com
Tue Jun 6 15:14:58 CDT 2017
These are already checked in msacm32 or not checked on Windows.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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
More information about the wine-patches
mailing list