- Timestamp:
- Jan 18, 2022 11:31:09 AM (3 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.cpp
r93115 r93307 296 296 while (cFrames-- > 0) 297 297 { 298 *piSample = (int8_t)(126 /*Amplitude*/ * sin(rdFixed * iSrcFrame));298 *piSample = (int8_t)(126 /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame)); 299 299 iSrcFrame++; 300 300 piSample += cbFrame; … … 307 307 while (cFrames-- > 0) 308 308 { 309 *pbSample = (uint8_t)(126 /*Amplitude*/ * sin(rdFixed * iSrcFrame) + 0x80);309 *pbSample = (uint8_t)(126 /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame) + 0x80); 310 310 iSrcFrame++; 311 311 pbSample += cbFrame; … … 320 320 while (cFrames-- > 0) 321 321 { 322 *piSample = (int16_t)(32760 /*Amplitude*/ * sin(rdFixed * iSrcFrame));322 *piSample = (int16_t)(32760 /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame)); 323 323 iSrcFrame++; 324 324 piSample = (int16_t *)((uint8_t *)piSample + cbFrame); … … 331 331 while (cFrames-- > 0) 332 332 { 333 *puSample = (uint16_t)(32760 /*Amplitude*/ * sin(rdFixed * iSrcFrame) + 0x8000);333 *puSample = (uint16_t)(32760 /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame) + 0x8000); 334 334 iSrcFrame++; 335 335 puSample = (uint16_t *)((uint8_t *)puSample + cbFrame); … … 345 345 while (cFrames-- > 0) 346 346 { 347 *piSample = (int32_t)((32760 << 16) /*Amplitude*/ * sin(rdFixed * iSrcFrame));347 *piSample = (int32_t)((32760 << 16) /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame)); 348 348 iSrcFrame++; 349 349 piSample = (int32_t *)((uint8_t *)piSample + cbFrame); … … 355 355 while (cFrames-- > 0) 356 356 { 357 *puSample = (uint32_t)((32760 << 16) /*Amplitude*/ * sin(rdFixed * iSrcFrame) + UINT32_C(0x80000000));357 *puSample = (uint32_t)((32760 << 16) /*Amplitude*/ * sin(rdFixed * (double)iSrcFrame) + UINT32_C(0x80000000)); 358 358 iSrcFrame++; 359 359 puSample = (uint32_t *)((uint8_t *)puSample + cbFrame); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h
r93115 r93307 75 75 * Format arguments for a float value, corresponding to FLOAT_FMT_STR. 76 76 * @param r The floating point value to format. */ 77 #define FLOAT_FMT_ARGS(r) (r) >= 0.0f ? "" : "-", (unsigned)RT_ABS(r), (unsigned)(RT_ABS((r) - (unsigned)(r)) * 1000000.0f) 77 #define FLOAT_FMT_ARGS(r) (r) >= 0.0f ? "" : "-", (unsigned)RT_ABS(r) \ 78 , (unsigned)(RT_ABS((r) - (float)(unsigned)(r)) * 1000000.0f) 78 79 79 80 /* Deprecated commands. They are not included in the VMSVGA headers anymore. */ -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win-d3d9.cpp
r93115 r93307 926 926 */ 927 927 float const xLeft = -0.5f; 928 float const xRight = ( cWidth - 1) - 0.5f;928 float const xRight = (float)(cWidth - 1) - 0.5f; 929 929 float const yTop = -0.5f; 930 float const yBottom = ( cHeight - 1) - 0.5f;930 float const yBottom = (float)(cHeight - 1) - 0.5f; 931 931 932 932 Vertex const aVertices[] = -
trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
r93115 r93307 325 325 " iFrame=%u cb=%'u c=%'u %'uKB/s %'ufps cLost=%'u \n", 326 326 &pArgs->Mac, iFrame, cbReceived, iFrame - cLostFrames, 327 (unsigned)( cbReceived * 1000000000.0 / 1024 /(pArgs->u64End - pArgs->u64Start)),328 (unsigned)(( iFrame - cLostFrames) * 1000000000.0 /(pArgs->u64End - pArgs->u64Start)),327 (unsigned)((double)cbReceived * 1000000000.0 / 1024 / (double)(pArgs->u64End - pArgs->u64Start)), 328 (unsigned)((double)(iFrame - cLostFrames) * 1000000000.0 / (double)(pArgs->u64End - pArgs->u64Start)), 329 329 cLostFrames); 330 330 return VINF_SUCCESS; … … 514 514 515 515 uint64_t u64Elapsed = RT_MAX(Args0.u64End, Args1.u64End) - RT_MIN(Args0.u64Start, Args1.u64Start); 516 uint64_t u64Speed = (uint64_t)(( 2 * g_cbTransfer / 1024) / (u64Elapsed / 1000000000.0));516 uint64_t u64Speed = (uint64_t)((double)(2 * g_cbTransfer / 1024) / ((double)u64Elapsed / 1000000000.0)); 517 517 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, 518 518 "transferred %u bytes in %'RU64 ns (%'RU64 KB/s)\n",
Note:
See TracChangeset
for help on using the changeset viewer.