VirtualBox

Changeset 87992 in vbox


Ignore:
Timestamp:
Mar 7, 2021 3:14:14 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Switched DrvAudioHlpFramesToNano parameters. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.h

    r87991 r87992  
    206206uint32_t DrvAudioHlpFramesToBytes(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps);
    207207uint64_t DrvAudioHlpFramesToMilli(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps);
    208 uint64_t DrvAudioHlpFramesToNano(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps);
     208uint64_t DrvAudioHlpFramesToNano(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames);
    209209uint32_t DrvAudioHlpMilliToBytes(uint64_t uMs, PCPDMAUDIOPCMPROPS pProps);
    210210uint32_t DrvAudioHlpNanoToBytes(uint64_t uNs, PCPDMAUDIOPCMPROPS pProps);
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r87991 r87992  
    13411341
    13421342/**
    1343  * Returns the time (in ms) for given audio frames amount and PCM properties.
    1344  *
    1345  * @return  uint64_t            Calculated time (in ms).
    1346  * @param   cFrames             Amount of audio frames to calculate time for.
    1347  * @param   pProps              PCM properties to calculate time (in ms) for.
     1343 * Converts frames to milliseconds.
     1344 *
     1345 * @returns milliseconds.
     1346 * @param   pProps      The PCM properties to use.
     1347 * @param   cFrames     Number of audio frames to convert.
    13481348 */
    13491349uint64_t DrvAudioHlpFramesToMilli(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps)
     
    13681368
    13691369/**
    1370  * Returns the time (in ns) for given audio frames amount and PCM properties.
    1371  *
    1372  * @return  uint64_t            Calculated time (in ns).
    1373  * @param   cFrames             Amount of audio frames to calculate time for.
    1374  * @param   pProps              PCM properties to calculate time (in ns) for.
    1375  */
    1376 uint64_t DrvAudioHlpFramesToNano(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps)
     1370 * Converts frames to nanoseconds.
     1371 *
     1372 * @returns Nanoseconds.
     1373 * @param   pProps      The PCM properties to use.
     1374 * @param   cFrames     Number of audio frames to convert.
     1375 */
     1376uint64_t DrvAudioHlpFramesToNano(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames)
    13771377{
    13781378    AssertPtrReturn(pProps, 0);
  • trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp

    r87991 r87992  
    6464
    6565
    66     RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToNano(44100, &s_Cfg441StereoS16)) == RT_NS_1SEC,
     66    RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToNano(&s_Cfg441StereoS16, 44100)) == RT_NS_1SEC,
    6767                      ("ns=%RU64\n", u64));
    6868    //RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToMicro(44100, &s_Cfg441StereoS16)) == RT_US_1SEC,
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