Module: wine Branch: master Commit: 24b315c51f1bc84866bb80331fd3c8ded72517e5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=24b315c51f1bc84866bb80331f...
Author: Francois Gouget fgouget@free.fr Date: Mon May 28 01:20:07 2007 +0200
dsound/tests: Fix the Visual C++ double to float conversion warnings.
---
dlls/dsound/tests/ds3d.c | 14 ++++++-------- dlls/dsound/tests/ds3d8.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 7790014..54b50e2 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -608,8 +608,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " "failed: %s\n",DXGetErrorString8(rc)); if (move_listener) { - listener_param.vPosition.x = -5.0; - listener_param.vVelocity.x = 10.0/duration; + listener_param.vPosition.x = -5.0f; + listener_param.vVelocity.x = (float)(10.0/duration); } rc=IDirectSound3DListener_SetAllParameters(listener, &listener_param, @@ -619,8 +619,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, } if (buffer3d) { if (move_sound) { - buffer_param.vPosition.x = 100.0; - buffer_param.vVelocity.x = -200.0/duration; + buffer_param.vPosition.x = 100.0f; + buffer_param.vVelocity.x = (float)(-200.0/duration); } buffer_param.flMinDistance = 10; rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, @@ -634,8 +634,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, WaitForSingleObject(GetCurrentProcess(),TIME_SLICE); now=GetTickCount(); if (listener && move_listener) { - listener_param.vPosition.x = -5.0+10.0*(now-start_time)/ - 1000/duration; + listener_param.vPosition.x = (float)(-5.0+10.0*(now-start_time)/1000/duration); if (winetest_debug>2) trace("listener position=%g\n",listener_param.vPosition.x); rc=IDirectSound3DListener_SetPosition(listener, @@ -645,8 +644,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, "%s\n",DXGetErrorString8(rc)); } if (buffer3d && move_sound) { - buffer_param.vPosition.x = 100-200.0*(now-start_time)/ - 1000/duration; + buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); if (winetest_debug>2) trace("sound position=%g\n",buffer_param.vPosition.x); rc=IDirectSound3DBuffer_SetPosition(buffer, diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 70b7526..00c0ef7 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -485,8 +485,8 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " "failed: %s\n",DXGetErrorString8(rc)); if (move_listener) { - listener_param.vPosition.x = -5.0; - listener_param.vVelocity.x = 10.0/duration; + listener_param.vPosition.x = -5.0f; + listener_param.vVelocity.x = (float)(10.0/duration); } rc=IDirectSound3DListener_SetAllParameters(listener, &listener_param, @@ -496,8 +496,8 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, } if (buffer3d) { if (move_sound) { - buffer_param.vPosition.x = 100.0; - buffer_param.vVelocity.x = -200.0/duration; + buffer_param.vPosition.x = 100.0f; + buffer_param.vVelocity.x = (float)(-200.0/duration); } buffer_param.flMinDistance = 10; rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, @@ -511,8 +511,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, WaitForSingleObject(GetCurrentProcess(),TIME_SLICE); now=GetTickCount(); if (listener && move_listener) { - listener_param.vPosition.x = -5.0+10.0*(now-start_time)/ - 1000/duration; + listener_param.vPosition.x = (float)(-5.0+10.0*(now-start_time)/1000/duration); if (winetest_debug>2) trace("listener position=%g\n",listener_param.vPosition.x); rc=IDirectSound3DListener_SetPosition(listener, @@ -522,8 +521,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, "%s\n",DXGetErrorString8(rc)); } if (buffer3d && move_sound) { - buffer_param.vPosition.x = 100-200.0*(now-start_time)/ - 1000/duration; + buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); if (winetest_debug>2) trace("sound position=%g\n",buffer_param.vPosition.x); rc=IDirectSound3DBuffer_SetPosition(buffer,