VirtualBox

Changeset 88027 in vbox


Ignore:
Timestamp:
Mar 8, 2021 6:55:08 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Preparing to move some of the DrvAudio.h stuff into PDM. bugref:9890

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r88023 r88027  
    24272427
    24282428        AssertPtr(pSink->pMixSink);
    2429         LogFlowFunc(("Sink=%s, Mixer control=%s\n", pSink->pMixSink->pszName, DrvAudioHlpAudMixerCtlToStr(enmMixerCtl)));
     2429        LogFlowFunc(("Sink=%s, Mixer control=%s\n", pSink->pMixSink->pszName, PDMAudioMixerCtlGetName(enmMixerCtl)));
    24302430    }
    24312431    else
     
    25032503        rc = VERR_NOT_FOUND;
    25042504
    2505     LogFunc(("Mixer control=%s, rc=%Rrc\n", DrvAudioHlpAudMixerCtlToStr(enmMixerCtl), rc));
     2505    LogFunc(("Mixer control=%s, rc=%Rrc\n", PDMAudioMixerCtlGetName(enmMixerCtl), rc));
    25062506    return rc;
    25072507}
     
    25162516    PHDASTATE   pThis   = PDMDEVINS_2_DATA(pDevIns, PHDASTATE);
    25172517    PHDASTATER3 pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATER3);
    2518     LogFunc(("enmMixerCtl=%s, uSD=%RU8, uChannel=%RU8\n", DrvAudioHlpAudMixerCtlToStr(enmMixerCtl), uSD, uChannel));
     2518    LogFunc(("enmMixerCtl=%s, uSD=%RU8, uChannel=%RU8\n", PDMAudioMixerCtlGetName(enmMixerCtl), uSD, uChannel));
    25192519
    25202520    if (uSD == 0) /* Stream number 0 is reserved. */
    25212521    {
    2522         Log2Func(("Invalid SDn (%RU8) number for mixer control '%s', ignoring\n", uSD, DrvAudioHlpAudMixerCtlToStr(enmMixerCtl)));
     2522        Log2Func(("Invalid SDn (%RU8) number for mixer control '%s', ignoring\n", uSD, PDMAudioMixerCtlGetName(enmMixerCtl)));
    25232523        return VINF_SUCCESS;
    25242524    }
     
    25832583        {
    25842584            LogRel2(("HDA: Setting sink '%s' to stream #%RU8 (channel %RU8), mixer control=%s\n",
    2585                      pSink->pMixSink->pszName, uSD, uChannel, DrvAudioHlpAudMixerCtlToStr(enmMixerCtl)));
     2585                     pSink->pMixSink->pszName, uSD, uChannel, PDMAudioMixerCtlGetName(enmMixerCtl)));
    25862586
    25872587            PHDASTREAMR3 pStreamR3     = &pThisCC->aStreams[uSD];
     
    26042604    if (RT_FAILURE(rc))
    26052605        LogRel(("HDA: Converter control for stream #%RU8 (channel %RU8) / mixer control '%s' failed with %Rrc, skipping\n",
    2606                 uSD, uChannel, DrvAudioHlpAudMixerCtlToStr(enmMixerCtl), rc));
     2606                uSD, uChannel, PDMAudioMixerCtlGetName(enmMixerCtl), rc));
    26072607
    26082608    LogFlowFuncLeaveRC(rc);
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r88023 r88027  
    26182618    ls = ichac97R3RecSourceToIdx(als);
    26192619
    2620     LogRel(("AC97: Record select to left=%s, right=%s\n", DrvAudioHlpRecSrcToStr(ars), DrvAudioHlpRecSrcToStr(als)));
     2620    LogRel(("AC97: Record select to left=%s, right=%s\n", PDMAudioRecSrcGetName(ars), PDMAudioRecSrcGetName(als)));
    26212621
    26222622    ichac97MixerSet(pThis, AC97_Record_Select, rs | (ls << 8));
  • trunk/src/VBox/Devices/Audio/DrvAudio.h

    r88026 r88027  
    279279/** @name Audio string-ify methods.
    280280 * @{ */
    281 const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl);
    282 const char *DrvAudioHlpPlaybackDstToStr(const PDMAUDIOPLAYBACKDST enmPlaybackDst);
    283 const char *DrvAudioHlpRecSrcToStr(const PDMAUDIORECSRC enmRecSource);
     281const char *PDMAudioMixerCtlGetName(PDMAUDIOMIXERCTL enmMixerCtl);
     282const char *PDMAudioPlaybackDstGetName(const PDMAUDIOPLAYBACKDST enmPlaybackDst);
     283const char *PDMAudioRecSrcGetName(const PDMAUDIORECSRC enmRecSource);
    284284PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt);
    285285char *DrvAudioHlpAudDevFlagsToStrA(uint32_t fFlags);
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r88026 r88027  
    500500 * @param   enmMixerCtl         Audio mixer control to convert.
    501501 */
    502 const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl)
     502const char *PDMAudioMixerCtlGetName(PDMAUDIOMIXERCTL enmMixerCtl)
    503503{
    504504    switch (enmMixerCtl)
     
    576576 * @param   enmPlaybackDst      Playback destination to convert.
    577577 */
    578 const char *DrvAudioHlpPlaybackDstToStr(const PDMAUDIOPLAYBACKDST enmPlaybackDst)
     578const char *PDMAudioPlaybackDstGetName(const PDMAUDIOPLAYBACKDST enmPlaybackDst)
    579579{
    580580    switch (enmPlaybackDst)
     
    598598 * @param   enmRecSrc           Recording source to convert.
    599599 */
    600 const char *DrvAudioHlpRecSrcToStr(const PDMAUDIORECSRC enmRecSrc)
     600const char *PDMAudioRecSrcGetName(const PDMAUDIORECSRC enmRecSrc)
    601601{
    602602    switch (enmRecSrc)
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r88023 r88027  
    11631163        {
    11641164            DSLOG(("DSound: Guest source '%s' is using host recording device '%s'\n",
    1165                    DrvAudioHlpRecSrcToStr(pCfg->u.enmSrc), pDev->szName));
     1165                   PDMAudioRecSrcGetName(pCfg->u.enmSrc), pDev->szName));
    11661166
    11671167            PDSOUNDDEV pDSoundDev = (PDSOUNDDEV)pDev->pvData;
     
    11821182    /* This always has to be in the release log. */
    11831183    LogRel(("DSound: Guest source '%s' is using host recording device with GUID '%s'\n",
    1184             DrvAudioHlpRecSrcToStr(pCfg->u.enmSrc), pszGUID ? pszGUID: "{?}"));
     1184            PDMAudioRecSrcGetName(pCfg->u.enmSrc), pszGUID ? pszGUID: "{?}"));
    11851185
    11861186    if (pszGUID)
     
    20862086{
    20872087    LogFunc(("pStreamDS=%p, pCfgReq=%p, enmRecSource=%s\n",
    2088              pStreamDS, pCfgReq, DrvAudioHlpRecSrcToStr(pCfgReq->u.enmSrc)));
     2088             pStreamDS, pCfgReq, PDMAudioRecSrcGetName(pCfgReq->u.enmSrc)));
    20892089
    20902090    int rc = VINF_SUCCESS;
  • trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp

    r88023 r88027  
    811811
    812812    char szName[256];
    813     RTStrPrintf(szName, sizeof(szName), "VirtualBox %s [%s]", DrvAudioHlpPlaybackDstToStr(pCfgReq->u.enmDst), pThis->szStreamName);
     813    RTStrPrintf(szName, sizeof(szName), "VirtualBox %s [%s]", PDMAudioPlaybackDstGetName(pCfgReq->u.enmDst), pThis->szStreamName);
    814814
    815815    /* Note that the struct BufAttr is updated to the obtained values after this call! */
     
    855855
    856856    char szName[256];
    857     RTStrPrintf(szName, sizeof(szName), "VirtualBox %s [%s]", DrvAudioHlpRecSrcToStr(pCfgReq->u.enmSrc), pThis->szStreamName);
     857    RTStrPrintf(szName, sizeof(szName), "VirtualBox %s [%s]", PDMAudioRecSrcGetName(pCfgReq->u.enmSrc), pThis->szStreamName);
    858858
    859859    /* Note: Other members of BufAttr are ignored for record streams. */
  • trunk/src/VBox/Devices/Audio/HDACodec.cpp

    r87807 r88027  
    898898
    899899    LogRel2(("HDA: Setting volume for mixer control '%s' to %RU8/%RU8 (%s)\n",
    900              DrvAudioHlpAudMixerCtlToStr(enmMixerCtl), lVol, rVol, RT_BOOL(iMute) ? "Muted" : "Unmuted"));
     900             PDMAudioMixerCtlGetName(enmMixerCtl), lVol, rVol, RT_BOOL(iMute) ? "Muted" : "Unmuted"));
    901901
    902902    return pThisCC->pfnCbMixerSetVolume(pThisCC->pDevIns, enmMixerCtl, &Vol);
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