Changeset 70972 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 12, 2018 12:47:16 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r70821 r70972 154 154 uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels); 155 155 uint32_t DrvAudioHlpCalcBitrate(const PPDMAUDIOPCMPROPS pProps); 156 uint32_t DrvAudioHlpMsToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs); 156 157 bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps1, const PPDMAUDIOPCMPROPS pPCMProps2); 157 158 bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps, const PPDMAUDIOSTREAMCFG pCfg); -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r70822 r70972 1028 1028 { 1029 1029 return DrvAudioHlpCalcBitrate(pProps->cBits, pProps->uHz, pProps->cChannels); 1030 } 1031 1032 /** 1033 * Returns the amount of bytes for a given time (in ms) and PCM properties. 1034 * 1035 * @return uint32_t Calculated amount of bytes. 1036 * @param pProps PCM properties to calculate amount of bytes for. 1037 * @param uMs Time (in ms) to calculate amount of bytes for. 1038 */ 1039 uint32_t DrvAudioHlpMsToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs) 1040 { 1041 AssertPtrReturn(pProps, 0); 1042 1043 if (!uMs) 1044 return 0; 1045 1046 return float(((pProps->cBits / 8) * pProps->cChannels * pProps->uHz) / 1000) * uMs; 1030 1047 } 1031 1048
Note:
See TracChangeset
for help on using the changeset viewer.