VirtualBox

Changeset 88171 in vbox


Ignore:
Timestamp:
Mar 18, 2021 1:43:19 AM (4 years ago)
Author:
vboxsync
Message:

DevHDA: Rewrote the wall clock code to base it on the virtual sync clock with a start offset and holding it back according to DMA progress. Introduced new saved state version. [build fix] bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r88170 r88171  
    10481048        return (uint32_t)RTCircBufFree(pStreamR3->State.pCircBuf);
    10491049    return 0;
    1050 }
    1051 
    1052 /**
    1053  * Converts frame count to wall clock ticks (WALCLK).
    1054  *
    1055  * @returns Wall clock ticks.
    1056  * @param   pStream     The stream to do the conversion for.
    1057  * @param   cFrames     Number of audio frames.
    1058  */
    1059 DECLINLINE(uint64_t) hdaR3StreamFramesToWalClk(PHDASTREAM pStreamShared, uint32_t cFrames)
    1060 {
    1061     const uint32_t uHz = RT_MAX(pStreamShared->State.Cfg.Props.uHz, 1 /* prevent div/0 */);
    1062     return ASMMultU32ByU32DivByU32(cFrames, 24000000 /* 24 MHz wall clock (WALCLK). */ , uHz);
    10631050}
    10641051
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette