VirtualBox

Changeset 89821 in vbox


Ignore:
Timestamp:
Jun 21, 2021 1:04:40 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145278
Message:

Audio: Some info item fixes and docs updates. bugref:9890

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r89768 r89821  
    14171417                PDMAudioPropsFramesToMilliMax(&pCfg->Props, pCfg->Backend.cFramesPreBuffering, 9999999),
    14181418                pCfg->Device.cMsSchedulingHint,
    1419                 pCfg->enmPath == PDMAUDIOPATH_UNKNOWN ? ", " : "",
     1419                pCfg->enmPath == PDMAUDIOPATH_UNKNOWN ? "" : ", ",
    14201420                pCfg->enmPath == PDMAUDIOPATH_UNKNOWN ? "" : PDMAudioPathGetName(pCfg->enmPath) );
    14211421    return pszDst;
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r89813 r89821  
    257257    AssertReturnVoid(pMixer->uMagic == AUDIOMIXER_MAGIC);
    258258
    259     int rc2 = RTCritSectEnter(&pMixer->CritSect);
    260     AssertRCReturnVoid(rc2);
    261 
    262     pHlp->pfnPrintf(pHlp, "[Master] %s: fMuted=%RTbool auChannels=%.*Rhxs\n",
    263                     pMixer->pszName, pMixer->VolMaster.fMuted, sizeof(pMixer->VolMaster.auChannels), pMixer->VolMaster.auChannels);
    264 
     259    int rc = RTCritSectEnter(&pMixer->CritSect);
     260    AssertRCReturnVoid(rc);
     261
     262    /* Determin max sink name length for pretty formatting: */
     263    size_t cchMaxName = strlen(pMixer->pszName);
    265264    PAUDMIXSINK pSink;
    266     unsigned    iSink = 0;
    267265    RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
    268266    {
    269         pHlp->pfnPrintf(pHlp, "[Sink %u] %s: fMuted=%RTbool auChannels=%.*Rhxs\n",
    270                         iSink, pSink->pszName, pSink->Volume.fMuted, sizeof(pSink->Volume.auChannels), pSink->Volume.auChannels);
     267        size_t const cchMixer = strlen(pSink->pszName);
     268        cchMaxName = RT_MAX(cchMixer, cchMaxName);
     269    }
     270
     271    /* Do the displaying. */
     272    pHlp->pfnPrintf(pHlp, "[Master] %*s: fMuted=%#RTbool auChannels=%.*Rhxs\n", cchMaxName, pMixer->pszName,
     273                    pMixer->VolMaster.fMuted, sizeof(pMixer->VolMaster.auChannels), pMixer->VolMaster.auChannels);
     274    unsigned iSink = 0;
     275    RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
     276    {
     277        pHlp->pfnPrintf(pHlp, "[Sink %u] %*s: fMuted=%#RTbool auChannels=%.*Rhxs\n", iSink, cchMaxName, pSink->pszName,
     278                        pSink->Volume.fMuted, sizeof(pSink->Volume.auChannels), pSink->Volume.auChannels);
    271279        ++iSink;
    272280    }
    273281
    274     rc2 = RTCritSectLeave(&pMixer->CritSect);
    275     AssertRC(rc2);
     282    RTCritSectLeave(&pMixer->CritSect);
    276283}
    277284
  • trunk/src/VBox/Devices/Audio/DevHda.cpp

    r89810 r89821  
    41204120static void hdaR3DbgPrintStream(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int idxStream)
    41214121{
    4122 
    4123     pHlp->pfnPrintf(pHlp, "Stream #%d:\n", idxStream);
     4122    char szTmp[PDMAUDIOSTRMCFGTOSTRING_MAX];
     4123    PHDASTREAM const pStream = &pThis->aStreams[idxStream];
     4124    pHlp->pfnPrintf(pHlp, "Stream #%d: %s\n", idxStream, PDMAudioStrmCfgToString(&pStream->State.Cfg, szTmp, sizeof(szTmp)));
    41244125    pHlp->pfnPrintf(pHlp, "  SD%dCTL  : %R[sdctl]\n",   idxStream, HDA_STREAM_REG(pThis, CTL,   idxStream));
    41254126    pHlp->pfnPrintf(pHlp, "  SD%dCTS  : %R[sdsts]\n",   idxStream, HDA_STREAM_REG(pThis, STS,   idxStream));
    41264127    pHlp->pfnPrintf(pHlp, "  SD%dFIFOS: %R[sdfifos]\n", idxStream, HDA_STREAM_REG(pThis, FIFOS, idxStream));
    41274128    pHlp->pfnPrintf(pHlp, "  SD%dFIFOW: %R[sdfifow]\n", idxStream, HDA_STREAM_REG(pThis, FIFOW, idxStream));
    4128 
    4129     PHDASTREAM const pStream = &pThis->aStreams[idxStream];
    41304129    pHlp->pfnPrintf(pHlp, "  Current BDLE%02u: %s%#RX64 LB %#x%s - off=%#x\n", pStream->State.idxCurBdle, "%%" /*vboxdbg phys prefix*/,
    41314130                    pStream->State.aBdl[pStream->State.idxCurBdle].GCPhys, pStream->State.aBdl[pStream->State.idxCurBdle].cb,
  • trunk/src/VBox/Devices/Audio/DevHdaStream.h

    r89406 r89821  
    115115     *  Can be 0 if no next transfer is scheduled. */
    116116    uint64_t                tsTransferNext;
    117     /** Total transfer size (in bytes) of a transfer period.
    118      * @note This is in host side frames, in case we're doing any mapping. */
     117    /** Total transfer size (in bytes) of a transfer period. */
    119118    uint32_t                cbTransferSize;
    120119    /** The size of an average transfer. */
    121120    uint32_t                cbAvgTransfer;
    122     /** The stream's current host side configuration.
    123      * This should match the SDnFMT in all respects but maybe the channel count as
    124      * we may need to expand mono or into/from into stereo.  The unmodified SDnFMT
    125      * properties can be found in HDASTREAMR3::Mapping::PCMProps. */
     121    /** The stream's current configuration (matches SDnFMT). */
    126122    PDMAUDIOSTREAMCFG       Cfg;
    127123    /** Timestamp (real time, in ns) of last DMA transfer. */
     
    200196 *       multiple audio streams in one single SDI/SDO (interleaving streams).
    201197 *
    202  * How a specific SDI/SDO is mapped to our internal audio streams relies on the
    203  * stream channel mappings.
    204  *
    205198 * Contains only register values which do *not* change until a stream reset
    206199 * occurs.
Note: See TracChangeset for help on using the changeset viewer.

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