Michael Stefaniuc : winmm/tests: Floating point numeric constants are by default doubles.
Alexandre Julliard
julliard at winehq.org
Tue Feb 19 15:29:34 CST 2019
Module: wine
Branch: master
Commit: 0388828edf1891af68985f1cc2e786917ec5608c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0388828edf1891af68985f1cc2e786917ec5608c
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Mon Feb 18 21:14:03 2019 +0100
winmm/tests: Floating point numeric constants are by default doubles.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winmm/tests/wave.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index c106594..9c114c8 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -102,11 +102,11 @@ static char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size)
for (i=0;i<nb_samples;i++) {
double y=sin(440.0*2*PI*i/wfx->nSamplesPerSec);
if (wfx->wBitsPerSample==8) {
- unsigned char sample=(unsigned char)((double)127.5*(y+1.0));
+ unsigned char sample=(unsigned char)(127.5*(y+1.0));
for (j = 0; j < wfx->nChannels; j++)
*b++=sample;
} else if (wfx->wBitsPerSample==16) {
- signed short sample=(signed short)((double)32767.5*y-0.5);
+ signed short sample=(signed short)(32767.5*y-0.5);
for (j = 0; j < wfx->nChannels; j++) {
b[0]=sample & 0xff;
b[1]=sample >> 8;
More information about the wine-cvs
mailing list