Changeset 87587 in vbox
- Timestamp:
- Feb 3, 2021 4:46:12 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r87586 r87587 29 29 #include <VBox/vmm/pdmdev.h> 30 30 #include <VBox/vmm/pdmaudioifs.h> 31 32 #include <math.h> /* Needed for roundl(). */33 31 34 32 #include "DrvAudio.h" … … 548 546 const double cTicksPerByte = cTicksPerHz / (double)pStreamShared->State.cbTransferChunk; 549 547 548 #define HDA_ROUND_NEAREST(a_X) ((a_X) >= 0 ? (uint32_t)((a_X) + 0.5) : (uint32_t)((a_X) - 0.5)) /** @todo r=andy Do we have rounding in IPRT? */ 549 550 550 /* Calculate the timer ticks per byte for this stream. */ 551 pStreamShared->State.cTicksPerByte = roundl(cTicksPerByte); /** @todo r=andy Do we have rounding in IPRT? */551 pStreamShared->State.cTicksPerByte = HDA_ROUND_NEAREST(cTicksPerByte); 552 552 Assert(pStreamShared->State.cTicksPerByte); 553 553 … … 555 555 556 556 /* Calculate timer ticks per transfer. */ 557 pStreamShared->State.cTransferTicks = roundl(cTransferTicks);557 pStreamShared->State.cTransferTicks = HDA_ROUND_NEAREST(cTransferTicks); 558 558 Assert(pStreamShared->State.cTransferTicks); 559 560 #undef HDA_ROUND_NEAREST 559 561 560 562 LogRel2(("HDA: Stream #%RU8 is using %uHz device timer (%RU64 virtual ticks / Hz), stream Hz=%RU32, " … … 2110 2112 2111 2113 #endif /* IN_RING3 */ 2112
Note:
See TracChangeset
for help on using the changeset viewer.