VirtualBox

Changeset 88626 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 21, 2021 9:58:08 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143928
Message:

DrvHostAudioWasApi: Early WASAPI backend. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r88486 r88626  
    881881
    882882/**
     883 * Converts frames to NT ticks (100 ns units).
     884 *
     885 * @returns NT ticks.
     886 * @param   pProps      The PCM properties to use.
     887 * @param   cFrames     Number of audio frames to convert.
     888 * @note    No rounding here, result is floored.
     889 */
     890DECLINLINE(uint64_t) PDMAudioPropsFramesToNtTicks(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames)
     891{
     892    AssertPtrReturn(pProps, 0);
     893
     894    /* Check input to prevent division by chainsaw: */
     895    uint32_t const uHz = pProps->uHz;
     896    if (uHz)
     897        return ASMMultU32ByU32DivByU32(cFrames, RT_NS_1SEC / 100, uHz);
     898    return 0;
     899}
     900
     901/**
    883902 * Converts milliseconds to frames.
    884903 *
Note: See TracChangeset for help on using the changeset viewer.

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