Changeset 87992 in vbox
- Timestamp:
- Mar 7, 2021 3:14:14 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r87991 r87992 206 206 uint32_t DrvAudioHlpFramesToBytes(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps); 207 207 uint64_t DrvAudioHlpFramesToMilli(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps); 208 uint64_t DrvAudioHlpFramesToNano( uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps);208 uint64_t DrvAudioHlpFramesToNano(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames); 209 209 uint32_t DrvAudioHlpMilliToBytes(uint64_t uMs, PCPDMAUDIOPCMPROPS pProps); 210 210 uint32_t DrvAudioHlpNanoToBytes(uint64_t uNs, PCPDMAUDIOPCMPROPS pProps); -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r87991 r87992 1341 1341 1342 1342 /** 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. 1348 1348 */ 1349 1349 uint64_t DrvAudioHlpFramesToMilli(uint32_t cFrames, PCPDMAUDIOPCMPROPS pProps) … … 1368 1368 1369 1369 /** 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 */ 1376 uint64_t DrvAudioHlpFramesToNano(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames) 1377 1377 { 1378 1378 AssertPtrReturn(pProps, 0); -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r87991 r87992 64 64 65 65 66 RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToNano( 44100, &s_Cfg441StereoS16)) == RT_NS_1SEC,66 RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToNano(&s_Cfg441StereoS16, 44100)) == RT_NS_1SEC, 67 67 ("ns=%RU64\n", u64)); 68 68 //RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToMicro(44100, &s_Cfg441StereoS16)) == RT_US_1SEC,
Note:
See TracChangeset
for help on using the changeset viewer.