Changeset 73208 in vbox for trunk/src/VBox
- Timestamp:
- Jul 18, 2018 3:00:47 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r73207 r73208 155 155 uint32_t DrvAudioHlpCalcBitrate(const PPDMAUDIOPCMPROPS pProps); 156 156 uint32_t DrvAudioHlpBytesToFrames(const PPDMAUDIOPCMPROPS pProps, uint32_t cbBytes); 157 uint64_t DrvAudioHlpBytesToMs(const PPDMAUDIOPCMPROPS pProps, size_t cbBytes);157 uint64_t DrvAudioHlpBytesToMs(const PPDMAUDIOPCMPROPS pProps, uint32_t cbBytes); 158 158 uint32_t DrvAudioHlpFramesToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t cFrames); 159 float DrvAudioHlpFramesToMs(const PPDMAUDIOPCMPROPS pProps, size_t cFrames);159 uint64_t DrvAudioHlpFramesToMs(const PPDMAUDIOPCMPROPS pProps, uint32_t cFrames); 160 160 uint32_t DrvAudioHlpMsToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs); 161 161 uint32_t DrvAudioHlpMsToFrames(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs); -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r73207 r73208 1084 1084 * @param cbBytes Amount of bytes to calculate time for. 1085 1085 */ 1086 uint64_t DrvAudioHlpBytesToMs(const PPDMAUDIOPCMPROPS pProps, size_t cbBytes)1086 uint64_t DrvAudioHlpBytesToMs(const PPDMAUDIOPCMPROPS pProps, uint32_t cbBytes) 1087 1087 { 1088 1088 AssertPtrReturn(pProps, 0); … … 1119 1119 * Returns the time (in ms) for given audio frames amount and PCM properties. 1120 1120 * 1121 * @return floatCalculated time (in ms).1121 * @return uint64_t Calculated time (in ms). 1122 1122 * @param pProps PCM properties to calculate time (in ms) for. 1123 1123 * @param cFrames Amount of audio frames to calculate time for. 1124 1124 */ 1125 float DrvAudioHlpFramesToMs(const PPDMAUDIOPCMPROPS pProps, size_t cFrames)1125 uint64_t DrvAudioHlpFramesToMs(const PPDMAUDIOPCMPROPS pProps, uint32_t cFrames) 1126 1126 { 1127 1127 AssertPtrReturn(pProps, 0); … … 1133 1133 return 0; 1134 1134 1135 return float(cFrames / (pProps->uHz / 1000 /* ms */));1135 return cFrames / (pProps->uHz / 1000 /* ms */); 1136 1136 } 1137 1137
Note:
See TracChangeset
for help on using the changeset viewer.