From e2c0ea01ac2f7e4f5fc13e83c76119599b30aa4b Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 23 Sep 2011 16:05:37 +0200 Subject: [PATCH] dsound/tests: Remove some explicit casts that happen implicitly. --- dlls/dsound/tests/ds3d.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index e8c2e328cdb..3e56c8aa9ec 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -54,12 +54,12 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee for (i=0;inSamplesPerSec); if (wfx->wBitsPerSample==8) { - unsigned char sample=(unsigned char)((double)127.5*(y+1.0)); + unsigned char sample=127.5*(y+1.0); *b++=sample; if (wfx->nChannels==2) *b++=sample; } else if (wfx->wBitsPerSample == 16) { - signed short sample=(signed short)((double)32767.5*y-0.5); + signed short sample=32767.5*y-0.5; b[0]=sample & 0xff; b[1]=sample >> 8; b+=2; @@ -69,7 +69,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee b+=2; } } else if (wfx->wBitsPerSample == 24) { - signed int sample=(signed int)((double)8388607.5*y-0.5); + signed int sample=8388607.5*y-0.5; b[0]=sample & 0xff; b[1]=(sample >> 8)&0xff; b[2]=sample >> 16; @@ -93,7 +93,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee b+=4; } } else { - signed int sample=(signed int)((double)2147483647.5*y-0.5); + signed int sample=2147483647.5*y-0.5; b[0]=sample & 0xff; b[1]=(sample >> 8)&0xff; b[2]=(sample >> 16)&0xff; -- 2.11.4.GIT