VirtualBox

Changeset 88309 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Mar 29, 2021 8:23:10 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143528
Message:

Audio: More statistics tweaking. bugref:9890

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

Legend:

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

    r88307 r88309  
    219219    uint8_t                 cStreams;
    220220    /** List of assigned streams.
    221      *  Note: All streams have the same PCM properties, so the
    222      *        mixer does not do any conversion. */
     221     * @note All streams have the same PCM properties, so the mixer does not do
     222     *       any conversion. */
    223223    /** @todo Use something faster -- vector maybe? */
    224224    RTLISTANCHOR            lstStreams;
  • trunk/src/VBox/Devices/Audio/DevHdaStream.cpp

    r88307 r88309  
    15421542 * @param   pStreamShared   HDA stream to update (shared bits).
    15431543 * @param   pStreamR3       HDA stream to update (ring-3 bits).
    1544  * @param   pSink           The mixer sink to push to.
     1544 * @param   pSink           The mixer sink to pull from.
    15451545 */
    15461546static void hdaR3StreamPullFromMixer(PHDASTREAM pStreamShared, PHDASTREAMR3 pStreamR3, PAUDMIXSINK pSink)
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88307 r88309  
    26512651    PPDMDRVINS const pDrvIns = pThis->pDrvIns;
    26522652    /** @todo expose config and more. */
    2653     if (pCfgGuest->enmDir == PDMAUDIODIR_OUT)
    2654     {
     2653    PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.Cfg.Backend.cFramesBufferSize, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2654                           "Host side: The size of the backend buffer (in frames)", "%s/0-HostBackendBufSize", pStream->szName);
     2655    PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.MixBuf.cFrames, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2656                           "Host side: The size of the mixer buffer (in frames)",   "%s/1-HostMixBufSize", pStream->szName);
     2657    PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Guest.MixBuf.cFrames, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2658                           "Guest side: The size of the mixer buffer (in frames)",  "%s/2-GuestMixBufSize", pStream->szName);
     2659    if (pCfgGuest->enmDir == PDMAUDIODIR_IN)
     2660    {
     2661        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.MixBuf.cMixed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2662                               "Host side: Number of frames in the mixer buffer",   "%s/1-HostMixBufUsed", pStream->szName);
     2663        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Guest.MixBuf.cUsed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2664                               "Guest side: Number of frames in the mixer buffer",  "%s/2-GuestMixBufUsed", pStream->szName);
     2665    }
     2666    else
     2667    {
     2668        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.MixBuf.cUsed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2669                               "Host side: Number of frames in the mixer buffer",     "%s/1-HostMixBufUsed", pStream->szName);
     2670        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Guest.MixBuf.cMixed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
     2671                               "Guest side: Number of frames in the mixer buffer",    "%s/2-GuestMixBufUsed", pStream->szName);
     2672
    26552673        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Out.Stats.cbBackendWritableBefore, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2656                                "Host side: Free space in backend buffer before play",  "%s/HostBackedBufFreeBefore", pStream->szName);
     2674                               "Host side: Free space in backend buffer before play", "%s/0-HostBackendBufFreeBefore", pStream->szName);
    26572675        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Out.Stats.cbBackendWritableAfter, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2658                                "Host side: Free space in backend buffer after play",   "%s/HostBackedBufFreeAfter", pStream->szName);
    2659     }
    2660     PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.Cfg.Backend.cFramesBufferSize, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2661                            "Host side: The size of the backend buffer (in frames)", "%s/HostBackedBufSize", pStream->szName);
    2662     PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.MixBuf.cFrames, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2663                            "Host side: The size of the mixer buffer (in frames)",   "%s/HostMixBufSize", pStream->szName);
    2664     PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Host.MixBuf.cUsed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2665                            "Host side: Number of frames in the mixer buffer",       "%s/HostMixBufUsed", pStream->szName);
    2666     PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Guest.MixBuf.cFrames, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2667                            "Guest side: The size of the mixer buffer (in frames)",  "%s/GuestMixBufSize", pStream->szName);
    2668     PDMDrvHlpSTAMRegisterF(pDrvIns, &pStream->Guest.MixBuf.cUsed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_NONE,
    2669                            "Guest side: Number of frames in the mixer buffer",      "%s/GuestMixBufUsed", pStream->szName);
     2676                               "Host side: Free space in backend buffer after play",  "%s/0-HostBackendBufFreeAfter", pStream->szName);
     2677    }
    26702678
    26712679#ifdef VBOX_WITH_STATISTICS
     
    32433251            pStream->In.Dbg.pFileStreamRead = NULL;
    32443252        }
     3253        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Host.MixBuf.cMixed);
     3254        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Guest.MixBuf.cUsed);
    32453255    }
    32463256    else
     
    32633273        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Out.Stats.cbBackendWritableAfter);
    32643274        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Out.Stats.cbBackendWritableBefore);
     3275        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Host.MixBuf.cUsed);
     3276        PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Guest.MixBuf.cMixed);
    32653277    }
    32663278    PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Host.Cfg.Backend.cFramesBufferSize);
    32673279    PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Host.MixBuf.cFrames);
    3268     PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Host.MixBuf.cUsed);
    32693280    PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Guest.MixBuf.cFrames);
    3270     PDMDrvHlpSTAMDeregister(pDrvIns, &pStream->Guest.MixBuf.cUsed);
    32713281
    32723282    LogFlowFunc(("Returning %Rrc\n", rc));
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