Changeset 73220 in vbox
- Timestamp:
- Jul 18, 2018 4:37:46 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r73208 r73220 147 147 ( (PDRVAUDIO)((uintptr_t)pInterface - RT_UOFFSETOF(DRVAUDIO, IAudioConnector)) ) 148 148 149 149 /** @name Audio format helper methods. 150 * @{ */ 151 const char *DrvAudioHlpAudDirToStr(PDMAUDIODIR enmDir); 152 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt); 150 153 bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt); 151 154 uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt); 152 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt); 155 /** @} */ 156 157 /** @name Audio calculation helper methods. 158 * @{ */ 153 159 void DrvAudioHlpClearBuf(const PPDMAUDIOPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cFrames); 154 160 uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels); … … 160 166 uint32_t DrvAudioHlpMsToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs); 161 167 uint32_t DrvAudioHlpMsToFrames(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs); 168 /** @} */ 169 170 /** @name Audio PCM properties helper methods. 171 * @{ */ 162 172 bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps1, const PPDMAUDIOPCMPROPS pPCMProps2); 163 173 bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps, const PPDMAUDIOSTREAMCFG pCfg); … … 166 176 void DrvAudioHlpPCMPropsPrint(const PPDMAUDIOPCMPROPS pProps); 167 177 int DrvAudioHlpPCMPropsToStreamCfg(const PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg); 168 const char *DrvAudioHlpPlaybackDstToStr(const PDMAUDIOPLAYBACKDEST enmPlaybackDst); 169 const char *DrvAudioHlpRecSrcToStr(const PDMAUDIORECSOURCE enmRecSource); 178 /** @} */ 179 180 /** @name Audio stream helper methods. 181 * @{ */ 170 182 void DrvAudioHlpStreamCfgPrint(const PPDMAUDIOSTREAMCFG pCfg); 171 183 bool DrvAudioHlpStreamCfgIsValid(const PPDMAUDIOSTREAMCFG pCfg); … … 174 186 void DrvAudioHlpStreamCfgFree(PPDMAUDIOSTREAMCFG pCfg); 175 187 const char *DrvAudioHlpStreamCmdToStr(PDMAUDIOSTREAMCMD enmCmd); 176 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt); 177 188 /** @} */ 189 190 /** @name Audio file (name) helper methods. 191 * @{ */ 178 192 int DrvAudioHlpSanitizeFileName(char *pszPath, size_t cbPath); 179 193 int DrvAudioHlpGetFileName(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName, uint32_t uInstance, PDMAUDIOFILETYPE enmType, PDMAUDIOFILENAMEFLAGS fFlags); 180 194 /** @} */ 195 196 /** @name Audio device methods. 197 * @{ */ 181 198 PPDMAUDIODEVICE DrvAudioHlpDeviceAlloc(size_t cbData); 182 199 void DrvAudioHlpDeviceFree(PPDMAUDIODEVICE pDev); 183 200 PPDMAUDIODEVICE DrvAudioHlpDeviceDup(const PPDMAUDIODEVICE pDev, bool fCopyUserData); 184 201 /** @} */ 202 203 /** @name Audio device enumartion methods. 204 * @{ */ 185 205 int DrvAudioHlpDeviceEnumInit(PPDMAUDIODEVICEENUM pDevEnm); 186 206 void DrvAudioHlpDeviceEnumFree(PPDMAUDIODEVICEENUM pDevEnm); … … 193 213 PPDMAUDIODEVICE DrvAudioHlpDeviceEnumGetDefaultDevice(const PPDMAUDIODEVICEENUM pDevEnm, PDMAUDIODIR enmDir); 194 214 void DrvAudioHlpDeviceEnumPrint(const char *pszDesc, const PPDMAUDIODEVICEENUM pDevEnm); 195 196 const char *DrvAudioHlpAudDirToStr(PDMAUDIODIR enmDir); 215 /** @} */ 216 217 /** @name Audio string-ify methods. 218 * @{ */ 197 219 const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl); 220 const char *DrvAudioHlpPlaybackDstToStr(const PDMAUDIOPLAYBACKDEST enmPlaybackDst); 221 const char *DrvAudioHlpRecSrcToStr(const PDMAUDIORECSOURCE enmRecSource); 222 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt); 198 223 char *DrvAudioHlpAudDevFlagsToStrA(PDMAUDIODEVFLAG fFlags); 199 224 /** @} */ 225 226 /** @name Audio file methods. 227 * @{ */ 200 228 int DrvAudioHlpFileCreate(PDMAUDIOFILETYPE enmType, const char *pszFile, PDMAUDIOFILEFLAGS fFlags, PPDMAUDIOFILE *ppFile); 201 229 void DrvAudioHlpFileDestroy(PPDMAUDIOFILE pFile); … … 206 234 bool DrvAudioHlpFileIsOpen(PPDMAUDIOFILE pFile); 207 235 int DrvAudioHlpFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags); 236 /** @} */ 208 237 209 238 #define AUDIO_MAKE_FOURCC(c0, c1, c2, c3) RT_H2LE_U32_C(RT_MAKE_U32_FROM_U8(c0, c1, c2, c3))
Note:
See TracChangeset
for help on using the changeset viewer.