VirtualBox

Changeset 73220 in vbox


Ignore:
Timestamp:
Jul 18, 2018 4:37:46 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Helper function grouping / docs.

File:
1 edited

Legend:

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

    r73208 r73220  
    147147    ( (PDRVAUDIO)((uintptr_t)pInterface - RT_UOFFSETOF(DRVAUDIO, IAudioConnector)) )
    148148
    149 
     149/** @name Audio format helper methods.
     150 * @{ */
     151const char *DrvAudioHlpAudDirToStr(PDMAUDIODIR enmDir);
     152const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt);
    150153bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt);
    151154uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt);
    152 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt);
     155/** @}  */
     156
     157/** @name Audio calculation helper methods.
     158 * @{ */
    153159void DrvAudioHlpClearBuf(const PPDMAUDIOPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cFrames);
    154160uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
     
    160166uint32_t DrvAudioHlpMsToBytes(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs);
    161167uint32_t DrvAudioHlpMsToFrames(const PPDMAUDIOPCMPROPS pProps, uint32_t uMs);
     168/** @}  */
     169
     170/** @name Audio PCM properties helper methods.
     171 * @{ */
    162172bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps1, const PPDMAUDIOPCMPROPS pPCMProps2);
    163173bool DrvAudioHlpPCMPropsAreEqual(const PPDMAUDIOPCMPROPS pPCMProps, const PPDMAUDIOSTREAMCFG pCfg);
     
    166176void DrvAudioHlpPCMPropsPrint(const PPDMAUDIOPCMPROPS pProps);
    167177int 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 * @{ */
    170182void DrvAudioHlpStreamCfgPrint(const PPDMAUDIOSTREAMCFG pCfg);
    171183bool DrvAudioHlpStreamCfgIsValid(const PPDMAUDIOSTREAMCFG pCfg);
     
    174186void DrvAudioHlpStreamCfgFree(PPDMAUDIOSTREAMCFG pCfg);
    175187const char *DrvAudioHlpStreamCmdToStr(PDMAUDIOSTREAMCMD enmCmd);
    176 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt);
    177 
     188/** @}  */
     189
     190/** @name Audio file (name) helper methods.
     191 * @{ */
    178192int DrvAudioHlpSanitizeFileName(char *pszPath, size_t cbPath);
    179193int 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 * @{ */
    181198PPDMAUDIODEVICE DrvAudioHlpDeviceAlloc(size_t cbData);
    182199void DrvAudioHlpDeviceFree(PPDMAUDIODEVICE pDev);
    183200PPDMAUDIODEVICE DrvAudioHlpDeviceDup(const PPDMAUDIODEVICE pDev, bool fCopyUserData);
    184 
     201/** @}  */
     202
     203/** @name Audio device enumartion methods.
     204 * @{ */
    185205int DrvAudioHlpDeviceEnumInit(PPDMAUDIODEVICEENUM pDevEnm);
    186206void DrvAudioHlpDeviceEnumFree(PPDMAUDIODEVICEENUM pDevEnm);
     
    193213PPDMAUDIODEVICE DrvAudioHlpDeviceEnumGetDefaultDevice(const PPDMAUDIODEVICEENUM pDevEnm, PDMAUDIODIR enmDir);
    194214void DrvAudioHlpDeviceEnumPrint(const char *pszDesc, const PPDMAUDIODEVICEENUM pDevEnm);
    195 
    196 const char *DrvAudioHlpAudDirToStr(PDMAUDIODIR enmDir);
     215/** @}  */
     216
     217/** @name Audio string-ify methods.
     218 * @{ */
    197219const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl);
     220const char *DrvAudioHlpPlaybackDstToStr(const PDMAUDIOPLAYBACKDEST enmPlaybackDst);
     221const char *DrvAudioHlpRecSrcToStr(const PDMAUDIORECSOURCE enmRecSource);
     222PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt);
    198223char *DrvAudioHlpAudDevFlagsToStrA(PDMAUDIODEVFLAG fFlags);
    199 
     224/** @}  */
     225
     226/** @name Audio file methods.
     227 * @{ */
    200228int DrvAudioHlpFileCreate(PDMAUDIOFILETYPE enmType, const char *pszFile, PDMAUDIOFILEFLAGS fFlags, PPDMAUDIOFILE *ppFile);
    201229void DrvAudioHlpFileDestroy(PPDMAUDIOFILE pFile);
     
    206234bool DrvAudioHlpFileIsOpen(PPDMAUDIOFILE pFile);
    207235int DrvAudioHlpFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags);
     236/** @}  */
    208237
    209238#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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette