Commit 0388828e authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winmm/tests: Floating point numeric constants are by default doubles.

parent 7ce2a8e0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment