VirtualBox

Changeset 76857 in vbox


Ignore:
Timestamp:
Jan 17, 2019 1:51:22 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudioCommon: Added DrvAudioHlpStreamCfgInit() and make use of it in DrvAudioHlpPCMPropsToStreamCfg().

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r76565 r76857  
    209209/** @}  */
    210210
    211 /** @name Audio stream helper methods.
    212  * @{ */
    213 void DrvAudioHlpStreamCfgPrint(const PPDMAUDIOSTREAMCFG pCfg);
     211/** @name Audio configuration helper methods.
     212 * @{ */
     213void DrvAudioHlpStreamCfgInit(PPDMAUDIOSTREAMCFG pCfg);
    214214bool DrvAudioHlpStreamCfgIsValid(const PPDMAUDIOSTREAMCFG pCfg);
    215215int DrvAudioHlpStreamCfgCopy(PPDMAUDIOSTREAMCFG pDstCfg, const PPDMAUDIOSTREAMCFG pSrcCfg);
    216216PPDMAUDIOSTREAMCFG DrvAudioHlpStreamCfgDup(const PPDMAUDIOSTREAMCFG pCfg);
    217217void DrvAudioHlpStreamCfgFree(PPDMAUDIOSTREAMCFG pCfg);
     218void DrvAudioHlpStreamCfgPrint(const PPDMAUDIOSTREAMCFG pCfg);
     219/** @}  */
     220
     221/** @name Audio stream command helper methods.
     222 * @{ */
    218223const char *DrvAudioHlpStreamCmdToStr(PDMAUDIOSTREAMCMD enmCmd);
    219224/** @}  */
    220225
    221 /** @name Audio stream helper methods.
     226/** @name Audio stream status helper methods.
    222227 * @{ */
    223228bool DrvAudioHlpStreamStatusCanRead(PDMAUDIOSTREAMSTS enmStatus);
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r76679 r76857  
    936936    AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
    937937
     938    DrvAudioHlpStreamCfgInit(pCfg);
     939
    938940    memcpy(&pCfg->Props, pProps, sizeof(PDMAUDIOPCMPROPS));
    939941    return VINF_SUCCESS;
     942}
     943
     944/**
     945 * Initializes a stream configuration with its default values.
     946 *
     947 * @param   pCfg                Pointer to stream to initialize.
     948 */
     949void DrvAudioHlpStreamCfgInit(PPDMAUDIOSTREAMCFG pCfg)
     950{
     951    RT_BZERO(pCfg, sizeof(PDMAUDIOSTREAMCFG));
     952
     953    pCfg->Backend.cfPreBuf = UINT32_MAX; /* Explicitly set to "undefined". */
    940954}
    941955
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