VirtualBox

Changeset 88724 in vbox


Ignore:
Timestamp:
Apr 27, 2021 10:24:18 AM (4 years ago)
Author:
vboxsync
Message:

Audio: PDMAUDIOSTREAMSTS_FLAGS_XXX -> PDMAUDIOSTREAM_STS_XXX. bugref:9890

Location:
trunk
Files:
15 edited

Legend:

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

    r88723 r88724  
    899899
    900900
    901 /** @name PDMAUDIOSTREAMSTS_FLAGS_XXX
     901/** @name PDMAUDIOSTREAM_STS_XXX
    902902 * @{ */
    903903/** No flags being set. */
    904 #define PDMAUDIOSTREAMSTS_FLAGS_NONE            UINT32_C(0)
     904#define PDMAUDIOSTREAM_STS_NONE             UINT32_C(0)
    905905/** Whether this stream has been initialized by the backend or not. */
    906 #define PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED     RT_BIT_32(0)
     906#define PDMAUDIOSTREAM_STS_INITIALIZED      RT_BIT_32(0)
    907907/** Whether this stream is enabled or disabled. */
    908 #define PDMAUDIOSTREAMSTS_FLAGS_ENABLED         RT_BIT_32(1)
     908#define PDMAUDIOSTREAM_STS_ENABLED          RT_BIT_32(1)
    909909/** Whether this stream has been paused or not. This also implies
    910910 *  that this is an enabled stream! */
    911 #define PDMAUDIOSTREAMSTS_FLAGS_PAUSED          RT_BIT_32(2)
     911#define PDMAUDIOSTREAM_STS_PAUSED           RT_BIT_32(2)
    912912/** Indicates that the stream is draining (output only).
    913913 *  Whether this stream was marked as being disabled
    914914 *  but there are still associated guest output streams
    915915 *  which rely on its data. */
    916 #define PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE RT_BIT_32(3)
     916#define PDMAUDIOSTREAM_STS_PENDING_DISABLE RT_BIT_32(3)
    917917/** Whether this stream is in re-initialization phase and requires the device
    918918 *  to call pfnStreamReInit.
     
    920920 *  All other bits remain untouched to be able to restore the stream's state
    921921 *  after the re-initialization has been completed. */
    922 #define PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT     RT_BIT_32(4)
     922#define PDMAUDIOSTREAM_STS_NEED_REINIT      RT_BIT_32(4)
    923923/** Validation mask. */
    924 #define PDMAUDIOSTREAMSTS_VALID_MASK            UINT32_C(0x0000001F)
    925 /** Stream status flag, PDMAUDIOSTREAMSTS_FLAGS_XXX. */
    926 typedef uint32_t PDMAUDIOSTREAMSTS;
     924#define PDMAUDIOSTREAM_STS_VALID_MASK       UINT32_C(0x0000001F)
     925/** Stream status flag, PDMAUDIOSTREAM_STS_XXX. */
     926typedef uint32_t uint32_t;
    927927/** @} */
    928928
     
    975975    uint32_t volatile       cRefs;
    976976    /** Stream status flag. */
    977     PDMAUDIOSTREAMSTS       fStatus;
     977    uint32_t       fStatus;
    978978    /** Audio direction of this stream. */
    979979    PDMAUDIODIR             enmDir;
     
    10921092
    10931093    /**
    1094      * Re-initializes the stream in response to PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT.
     1094     * Re-initializes the stream in response to PDMAUDIOSTREAM_STS_NEED_REINIT.
    10951095     *
    10961096     * @returns VBox status code.
     
    11621162     * @param   pStream         Pointer to audio stream.
    11631163     */
    1164     DECLR3CALLBACKMEMBER(PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
     1164    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
    11651165
    11661166    /**
     
    13751375     * Returns the current status of the given backend stream.
    13761376     *
    1377      * @returns PDMAUDIOSTREAMSTS
     1377     * @returns uint32_t
    13781378     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
    13791379     * @param   pStream             Pointer to audio stream.
    13801380     */
    1381     DECLR3CALLBACKMEMBER(PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream));
     1381    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream));
    13821382
    13831383    /**
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r88723 r88724  
    422422 *
    423423 * @returns @c true if ready to be read from, @c false if not.
    424  * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAMSTS_FLAGS_XXX.
    425  */
    426 DECLINLINE(bool) PDMAudioStrmStatusCanRead(PDMAUDIOSTREAMSTS fStatus)
    427 {
    428     AssertReturn(fStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false);
     424 * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX.
     425 */
     426DECLINLINE(bool) PDMAudioStrmStatusCanRead(uint32_t fStatus)
     427{
     428    AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false);
    429429    /*
    430     return      fStatus & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    431            &&   fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED
    432            && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED)
     430    return      fStatus & PDMAUDIOSTREAM_STS_INITIALIZED
     431           &&   fStatus & PDMAUDIOSTREAM_STS_ENABLED
     432           && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED)
    433433           && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/
    434     return (fStatus & (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    435                        | PDMAUDIOSTREAMSTS_FLAGS_ENABLED
    436                        | PDMAUDIOSTREAMSTS_FLAGS_PAUSED
    437                        | PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT ))
    438         == (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    439             | PDMAUDIOSTREAMSTS_FLAGS_ENABLED);
     434    return (fStatus & (  PDMAUDIOSTREAM_STS_INITIALIZED
     435                       | PDMAUDIOSTREAM_STS_ENABLED
     436                       | PDMAUDIOSTREAM_STS_PAUSED
     437                       | PDMAUDIOSTREAM_STS_NEED_REINIT ))
     438        == (  PDMAUDIOSTREAM_STS_INITIALIZED
     439            | PDMAUDIOSTREAM_STS_ENABLED);
    440440}
    441441
     
    444444 *
    445445 * @returns @c true if ready to be written to, @c false if not.
    446  * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAMSTS_FLAGS_XXX.
    447  */
    448 DECLINLINE(bool) PDMAudioStrmStatusCanWrite(PDMAUDIOSTREAMSTS fStatus)
    449 {
    450     AssertReturn(fStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false);
     446 * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX.
     447 */
     448DECLINLINE(bool) PDMAudioStrmStatusCanWrite(uint32_t fStatus)
     449{
     450    AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false);
    451451    /*
    452     return      fStatus & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    453            &&   fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED
    454            && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED)
    455            && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE)
     452    return      fStatus & PDMAUDIOSTREAM_STS_INITIALIZED
     453           &&   fStatus & PDMAUDIOSTREAM_STS_ENABLED
     454           && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED)
     455           && !(fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE)
    456456           && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/
    457     return (fStatus & (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    458                        | PDMAUDIOSTREAMSTS_FLAGS_ENABLED
    459                        | PDMAUDIOSTREAMSTS_FLAGS_PAUSED
    460                        | PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE
    461                        | PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT))
    462         == (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    463             | PDMAUDIOSTREAMSTS_FLAGS_ENABLED);
     457    return (fStatus & (  PDMAUDIOSTREAM_STS_INITIALIZED
     458                       | PDMAUDIOSTREAM_STS_ENABLED
     459                       | PDMAUDIOSTREAM_STS_PAUSED
     460                       | PDMAUDIOSTREAM_STS_PENDING_DISABLE
     461                       | PDMAUDIOSTREAM_STS_NEED_REINIT))
     462        == (  PDMAUDIOSTREAM_STS_INITIALIZED
     463            | PDMAUDIOSTREAM_STS_ENABLED);
    464464}
    465465
     
    468468 *
    469469 * @returns @c true if ready to operate, @c false if not.
    470  * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAMSTS_FLAGS_XXX.
    471  */
    472 DECLINLINE(bool) PDMAudioStrmStatusIsReady(PDMAUDIOSTREAMSTS fStatus)
    473 {
    474     AssertReturn(fStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false);
     470 * @param   fStatus     Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX.
     471 */
     472DECLINLINE(bool) PDMAudioStrmStatusIsReady(uint32_t fStatus)
     473{
     474    AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false);
    475475    /*
    476     return      fStatus & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    477            &&   fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED
     476    return      fStatus & PDMAUDIOSTREAM_STS_INITIALIZED
     477           &&   fStatus & PDMAUDIOSTREAM_STS_ENABLED
    478478           && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/
    479     return (fStatus & (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    480                        | PDMAUDIOSTREAMSTS_FLAGS_ENABLED
    481                        | PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT))
    482         == (  PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED
    483             | PDMAUDIOSTREAMSTS_FLAGS_ENABLED);
     479    return (fStatus & (  PDMAUDIOSTREAM_STS_INITIALIZED
     480                       | PDMAUDIOSTREAM_STS_ENABLED
     481                       | PDMAUDIOSTREAM_STS_NEED_REINIT))
     482        == (  PDMAUDIOSTREAM_STS_INITIALIZED
     483            | PDMAUDIOSTREAM_STS_ENABLED);
    484484}
    485485
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r88723 r88724  
    17341734            if (pMixStream->fStatus & AUDMIXSTREAM_STATUS_ENABLED)
    17351735            {
    1736                 PDMAUDIOSTREAMSTS const fSts = pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream);
    1737                 if (fSts & (PDMAUDIOSTREAMSTS_FLAGS_ENABLED | PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE))
     1736                uint32_t const fSts = pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream);
     1737                if (fSts & (PDMAUDIOSTREAM_STS_ENABLED | PDMAUDIOSTREAM_STS_PENDING_DISABLE))
    17381738                    cStreamsDisabled--;
    17391739            }
     
    18991899            if (pMixStream->fStatus & AUDMIXSTREAM_STATUS_ENABLED)
    19001900            {
    1901                 PDMAUDIOSTREAMSTS const fSts = pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream);
    1902                 if (fSts & (PDMAUDIOSTREAMSTS_FLAGS_ENABLED | PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE))
     1901                uint32_t const fSts = pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream);
     1902                if (fSts & (PDMAUDIOSTREAM_STS_ENABLED | PDMAUDIOSTREAM_STS_PENDING_DISABLE))
    19031903                    cStreamsDisabled--;
    19041904            }
     
    21032103         */
    21042104        uint32_t fStreamStatus = pConn->pfnStreamGetStatus(pConn, pStream);
    2105         if (!(fStreamStatus & PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT))
     2105        if (!(fStreamStatus & PDMAUDIOSTREAM_STS_NEED_REINIT))
    21062106        { /* likely */ }
    21072107        else
     
    22792279    if (   pMixStream->pConn
    22802280        && pMixStream->pStream
    2281         && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAGS_ENABLED))
    2282     {
     2281        && (pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAM_STS_ENABLED))
    22832282        fIsActive = true;
    2284     }
    22852283    else
    22862284        fIsActive = false;
     
    23112309    if (   pMixStream->pConn
    23122310        && pMixStream->pStream
    2313         && RT_BOOL(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED))
    2314     {
     2311        && (pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTREAM_STS_INITIALIZED))
    23152312        fIsValid = true;
    2316     }
    23172313    else
    23182314        fIsValid = false;
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88723 r88724  
    326326 * @param   fStatus     Stream status flags to convert.
    327327 */
    328 static const char *dbgAudioStreamStatusToStr(char pszDst[DRVAUDIO_STATUS_STR_MAX], PDMAUDIOSTREAMSTS fStatus)
     328static const char *dbgAudioStreamStatusToStr(char pszDst[DRVAUDIO_STATUS_STR_MAX], uint32_t fStatus)
    329329{
    330330    static const struct
     
    332332        const char         *pszMnemonic;
    333333        uint32_t            cchMnemnonic;
    334         PDMAUDIOSTREAMSTS   fFlag;
     334        uint32_t   fFlag;
    335335    } s_aFlags[] =
    336336    {
    337         { RT_STR_TUPLE("INITIALIZED "),     PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED     },
    338         { RT_STR_TUPLE("ENABLED "),         PDMAUDIOSTREAMSTS_FLAGS_ENABLED         },
    339         { RT_STR_TUPLE("PAUSED "),          PDMAUDIOSTREAMSTS_FLAGS_PAUSED          },
    340         { RT_STR_TUPLE("PENDING_DISABLE "), PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE },
    341         { RT_STR_TUPLE("NEED_REINIT "),     PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT     },
     337        { RT_STR_TUPLE("INITIALIZED "),     PDMAUDIOSTREAM_STS_INITIALIZED     },
     338        { RT_STR_TUPLE("ENABLED "),         PDMAUDIOSTREAM_STS_ENABLED         },
     339        { RT_STR_TUPLE("PAUSED "),          PDMAUDIOSTREAM_STS_PAUSED          },
     340        { RT_STR_TUPLE("PENDING_DISABLE "), PDMAUDIOSTREAM_STS_PENDING_DISABLE },
     341        { RT_STR_TUPLE("NEED_REINIT "),     PDMAUDIOSTREAM_STS_NEED_REINIT     },
    342342    };
    343343    if (!fStatus)
     
    428428    LogFunc(("[%s]\n", pStreamEx->Core.szName));
    429429
    430     pStreamEx->Core.fStatus        = PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
     430    pStreamEx->Core.fStatus        = PDMAUDIOSTREAM_STS_INITIALIZED;
    431431    pStreamEx->Core.fWarningsShown = PDMAUDIOSTREAM_WARN_FLAGS_NONE;
    432432
     
    469469            && pStreamEx->Core.cRefs >= 1)
    470470        {
    471             if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE)
     471            if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE)
    472472            {
    473473                drvAudioStreamIterateInternal(pThis, pStreamEx);
    474474
    475                 if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE)
     475                if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE)
    476476                    cMilliesToNext = 10;
    477477            }
     
    995995                                               PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    996996{
    997     AssertMsg((pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED) == 0,
     997    AssertMsg((pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_INITIALIZED) == 0,
    998998              ("Stream '%s' already initialized in backend\n", pStreamEx->Core.szName));
    999999
     
    10831083                    VERR_INVALID_PARAMETER);
    10841084
    1085     pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
     1085    pStreamEx->Core.fStatus |= PDMAUDIOSTREAM_STS_INITIALIZED;
    10861086
    10871087    return VINF_SUCCESS;
     
    14871487    LogFunc(("[%s] fStatus=%s\n", pStreamEx->Core.szName, dbgAudioStreamStatusToStr(szStreamSts, pStreamEx->Core.fStatus)));
    14881488
    1489     if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED)
     1489    if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_INITIALIZED)
    14901490    {
    14911491        AssertPtr(pStreamEx->pBackend);
     
    14961496            rc = pThis->pHostDrvAudio->pfnStreamDestroy(pThis->pHostDrvAudio, pStreamEx->pBackend);
    14971497
    1498         pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
     1498        pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAM_STS_INITIALIZED;
    14991499    }
    15001500
     
    15461546    {
    15471547#ifdef LOG_ENABLED
    1548         if (pStreamEx->Core.fStatus != PDMAUDIOSTREAMSTS_FLAGS_NONE)
     1548        if (pStreamEx->Core.fStatus != PDMAUDIOSTREAM_STS_NONE)
    15491549        {
    15501550            char szStreamSts[DRVAUDIO_STATUS_STR_MAX];
     
    15531553        }
    15541554#endif
    1555         pStreamEx->Core.fStatus = PDMAUDIOSTREAMSTS_FLAGS_NONE;
     1555        pStreamEx->Core.fStatus = PDMAUDIOSTREAM_STS_NONE;
    15561556    }
    15571557
     
    16611661     * Gather current stream status.
    16621662     */
    1663     const bool fIsEnabled = RT_BOOL(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED); /* Stream is enabled? */
     1663    const bool fIsEnabled = RT_BOOL(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED); /* Stream is enabled? */
    16641664
    16651665    /*
     
    17121712    AssertReturn(pStreamEx->Core.uMagic == PDMAUDIOSTREAM_MAGIC, VERR_INVALID_MAGIC);
    17131713    AssertReturn(pStreamEx->uMagic == DRVAUDIOSTREAM_MAGIC, VERR_INVALID_MAGIC);
    1714     AssertReturn(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT, VERR_INVALID_STATE);
     1714    AssertReturn(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_NEED_REINIT, VERR_INVALID_STATE);
    17151715    LogFlowFunc(("\n"));
    17161716
     
    17181718    AssertRCReturn(rc, rc);
    17191719
    1720     if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT)
     1720    if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_NEED_REINIT)
    17211721    {
    17221722        const unsigned cMaxTries = 3; /** @todo Make this configurable? */
     
    17491749            {
    17501750                /* Remove the pending re-init flag on success. */
    1751                 pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT;
     1751                pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAM_STS_NEED_REINIT;
    17521752            }
    17531753            else
     
    17671767
    17681768                /* Don't try to re-initialize anymore and mark as disabled. */
    1769                 pStreamEx->Core.fStatus &= ~(PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT | PDMAUDIOSTREAMSTS_FLAGS_ENABLED);
     1769                pStreamEx->Core.fStatus &= ~(PDMAUDIOSTREAM_STS_NEED_REINIT | PDMAUDIOSTREAM_STS_ENABLED);
    17701770
    17711771                /* Note: Further writes to this stream go to / will be read from the bit bucket (/dev/null) from now on. */
     
    19551955        case PDMAUDIOSTREAMCMD_ENABLE:
    19561956        {
    1957             if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED))
     1957            if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED))
    19581958            {
    19591959                /* Is a pending disable outstanding? Then disable first. */
    1960                 if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE)
     1960                if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE)
    19611961                    rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_DISABLE);
    19621962
     
    19651965
    19661966                if (RT_SUCCESS(rc))
    1967                     pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     1967                    pStreamEx->Core.fStatus |= PDMAUDIOSTREAM_STS_ENABLED;
    19681968            }
    19691969            break;
     
    19721972        case PDMAUDIOSTREAMCMD_DISABLE:
    19731973        {
    1974             if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED)
     1974            if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED)
    19751975            {
    19761976                /*
     
    19821982                {
    19831983                    LogFunc(("[%s] Pending disable/pause\n", pStreamEx->Core.szName));
    1984                     pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE;
     1984                    pStreamEx->Core.fStatus |= PDMAUDIOSTREAM_STS_PENDING_DISABLE;
    19851985
    19861986                    /* Schedule a follow up timer to the pending-disable state.  We cannot rely
     
    19981998
    19991999                /* Can we close the host stream as well (not in pending disable mode)? */
    2000                 if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE))
     2000                if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE))
    20012001                {
    20022002                    rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_DISABLE);
     
    20102010        case PDMAUDIOSTREAMCMD_PAUSE:
    20112011        {
    2012             if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED))
     2012            if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PAUSED))
    20132013            {
    20142014                rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_PAUSE);
    20152015                if (RT_SUCCESS(rc))
    2016                     pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_PAUSED;
     2016                    pStreamEx->Core.fStatus |= PDMAUDIOSTREAM_STS_PAUSED;
    20172017            }
    20182018            break;
     
    20212021        case PDMAUDIOSTREAMCMD_RESUME:
    20222022        {
    2023             if (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED)
     2023            if (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PAUSED)
    20242024            {
    20252025                rc = drvAudioStreamControlInternalBackend(pThis, pStreamEx, PDMAUDIOSTREAMCMD_RESUME);
    20262026                if (RT_SUCCESS(rc))
    2027                     pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAMSTS_FLAGS_PAUSED;
     2027                    pStreamEx->Core.fStatus &= ~PDMAUDIOSTREAM_STS_PAUSED;
    20282028            }
    20292029            break;
     
    21462146         * Try play "Windows Navigation Start.wav" on Windows 7 (2824 samples).
    21472147         */
    2148         else if (   (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE)
     2148        else if (   (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE)
    21492149                 && pStreamEx->Out.cbPreBuffered > 0)
    21502150        {
     
    22782278
    22792279    /* Not enabled or paused? Skip iteration. */
    2280     if (   !(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_ENABLED)
    2281         ||  (pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PAUSED))
     2280    if (   !(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_ENABLED)
     2281        ||  (pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PAUSED))
    22822282    {
    22832283        return VINF_SUCCESS;
     
    22882288     */
    22892289    int rc = VINF_SUCCESS;
    2290     if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE))
     2290    if (!(pStreamEx->Core.fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE))
    22912291    { /* likely until we get to the end of the stream at least. */ }
    22922292    else
     
    23482348                    if (RT_SUCCESS(rc))
    23492349                    {
    2350                         pStreamEx->Core.fStatus &= ~(PDMAUDIOSTREAMSTS_FLAGS_ENABLED | PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE);
     2350                        pStreamEx->Core.fStatus &= ~(PDMAUDIOSTREAM_STS_ENABLED | PDMAUDIOSTREAM_STS_PENDING_DISABLE);
    23512351                        drvAudioStreamDropInternal(pThis, pStreamEx); /* Not a DROP command, just a stream reset. */
    23522352                    }
     
    24412441             * Reading the actual data from a stream then will return silence then.
    24422442             */
    2443             PDMAUDIOSTREAMSTS fStatus = PDMAUDIOSTREAMSTS_FLAGS_NONE;
     2443            uint32_t fStatus = PDMAUDIOSTREAM_STS_NONE;
    24442444            if (pThis->pHostDrvAudio->pfnStreamGetStatus)
    24452445                fStatus = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pStreamEx->pBackend);
     
    25452545 * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetStatus}
    25462546 */
    2547 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
     2547static DECLCALLBACK(uint32_t) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
    25482548{
    25492549    PDRVAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVAUDIO, IAudioConnector);
     
    25532553     *        this necessary? */
    25542554    if (!pStream)
    2555         return PDMAUDIOSTREAMSTS_FLAGS_NONE;
     2555        return PDMAUDIOSTREAM_STS_NONE;
    25562556    PDRVAUDIOSTREAM pStreamEx = (PDRVAUDIOSTREAM)pStream;
    2557     AssertPtrReturn(pStreamEx, PDMAUDIOSTREAMSTS_FLAGS_NONE);
    2558     AssertReturn(pStreamEx->Core.uMagic == PDMAUDIOSTREAM_MAGIC, PDMAUDIOSTREAMSTS_FLAGS_NONE);
    2559     AssertReturn(pStreamEx->uMagic      == DRVAUDIOSTREAM_MAGIC, PDMAUDIOSTREAMSTS_FLAGS_NONE);
     2557    AssertPtrReturn(pStreamEx, PDMAUDIOSTREAM_STS_NONE);
     2558    AssertReturn(pStreamEx->Core.uMagic == PDMAUDIOSTREAM_MAGIC, PDMAUDIOSTREAM_STS_NONE);
     2559    AssertReturn(pStreamEx->uMagic      == DRVAUDIOSTREAM_MAGIC, PDMAUDIOSTREAM_STS_NONE);
    25602560
    25612561    int rc = RTCritSectEnter(&pThis->CritSect);
    2562     AssertRCReturn(rc, PDMAUDIOSTREAMSTS_FLAGS_NONE);
    2563 
    2564     PDMAUDIOSTREAMSTS fStrmStatus = pStreamEx->Core.fStatus;
     2562    AssertRCReturn(rc, PDMAUDIOSTREAM_STS_NONE);
     2563
     2564    uint32_t fStrmStatus = pStreamEx->Core.fStatus;
    25652565
    25662566    RTCritSectLeave(&pThis->CritSect);
     
    30473047    RTListForEach(&pThis->lstStreams, pStreamEx, DRVAUDIOSTREAM, ListEntry)
    30483048    {
    3049         pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_NEED_REINIT;
     3049        pStreamEx->Core.fStatus |= PDMAUDIOSTREAM_STS_NEED_REINIT;
    30503050        pStreamEx->cTriesReInit  = 0;
    30513051        pStreamEx->nsLastReInit  = 0;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp

    r88718 r88724  
    11201120 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    11211121 */
    1122 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostAlsaAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     1122static DECLCALLBACK(uint32_t) drvHostAlsaAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    11231123{
    11241124    RT_NOREF(pInterface, pStream);
    11251125
    1126     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     1126    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    11271127}
    11281128
  • trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp

    r88718 r88724  
    24262426 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    24272427 */
    2428 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostCoreAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     2428static DECLCALLBACK(uint32_t) drvHostCoreAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    24292429{
    24302430    RT_NOREF(pInterface);
     
    24332433    PCOREAUDIOSTREAM pCAStream = (PCOREAUDIOSTREAM)pStream;
    24342434
    2435     PDMAUDIOSTREAMSTS fStrmStatus = PDMAUDIOSTREAMSTS_FLAGS_NONE;
     2435    uint32_t fStrmStatus = PDMAUDIOSTREAM_STS_NONE;
    24362436
    24372437    if (pCAStream->pCfg) /* Configured?  */
    24382438    {
    24392439        if (ASMAtomicReadU32(&pCAStream->enmStatus) == COREAUDIOSTATUS_INIT)
    2440             fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     2440            fStrmStatus |= PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    24412441    }
    24422442
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp

    r88718 r88724  
    24042404 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    24052405 */
    2406 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostDSoundHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     2406static DECLCALLBACK(uint32_t) drvHostDSoundHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    24072407{
    24082408    RT_NOREF(pInterface);
    24092409    PDSOUNDSTREAM pStreamDS = (PDSOUNDSTREAM)pStream;
    2410     AssertPtrReturn(pStreamDS, PDMAUDIOSTREAMSTS_FLAGS_NONE);
    2411 
    2412     PDMAUDIOSTREAMSTS fStrmStatus = PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
     2410    AssertPtrReturn(pStreamDS, PDMAUDIOSTREAM_STS_NONE);
     2411
     2412    uint32_t fStrmStatus = PDMAUDIOSTREAM_STS_INITIALIZED;
    24132413    if (pStreamDS->fEnabled)
    2414         fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     2414        fStrmStatus |= PDMAUDIOSTREAM_STS_ENABLED;
    24152415
    24162416    LogFlowFunc(("returns %#x for '%s' {%s}\n", fStrmStatus, pStreamDS->Cfg.szName, drvHostDSoundStreamStatusString(pStreamDS)));
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp

    r88718 r88724  
    263263 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetWritable}
    264264 */
    265 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostDebugAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     265static DECLCALLBACK(uint32_t) drvHostDebugAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    266266{
    267267    RT_NOREF(pInterface, pStream);
    268     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     268    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    269269}
    270270
  • trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp

    r88718 r88724  
    183183 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    184184 */
    185 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostNullAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    186 {
    187     RT_NOREF(pInterface, pStream);
    188     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     185static DECLCALLBACK(uint32_t) drvHostNullAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     186{
     187    RT_NOREF(pInterface, pStream);
     188    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    189189}
    190190
  • trunk/src/VBox/Devices/Audio/DrvHostAudioOss.cpp

    r88718 r88724  
    701701 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    702702 */
    703 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostOssAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     703static DECLCALLBACK(uint32_t) drvHostOssAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    704704{
    705705    RT_NOREF(pInterface, pStream);
    706     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     706    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    707707}
    708708
  • trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp

    r88718 r88724  
    15491549 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    15501550 */
    1551 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostAudioPaHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     1551static DECLCALLBACK(uint32_t) drvHostAudioPaHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    15521552{
    15531553    PDRVHOSTPULSEAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPULSEAUDIO, IHostAudio);
     
    15611561        {
    15621562            /** @todo should we check the actual stream state? */
    1563             return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     1563            return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    15641564        }
    15651565        LogFunc(("non-good context state: %d\n", enmState));
     
    15671567    else
    15681568        LogFunc(("No context!\n"));
    1569     return PDMAUDIOSTREAMSTS_FLAGS_NONE;
     1569    return PDMAUDIOSTREAM_STS_NONE;
    15701570}
    15711571
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r88718 r88724  
    334334 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    335335 */
    336 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostValKitAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface,
    337                                                                             PPDMAUDIOBACKENDSTREAM pStream)
     336static DECLCALLBACK(uint32_t) drvHostValKitAudioHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    338337{
    339338    RT_NOREF(pInterface, pStream);
    340     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     339    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    341340}
    342341
  • trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp

    r88718 r88724  
    20812081 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    20822082 */
    2083 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvHostAudioWasHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     2083static DECLCALLBACK(uint32_t) drvHostAudioWasHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    20842084{
    20852085    RT_NOREF(pInterface);
    20862086    PDRVHOSTAUDIOWASSTREAM pStreamWas = (PDRVHOSTAUDIOWASSTREAM)pStream;
    2087     AssertPtrReturn(pStreamWas, PDMAUDIOSTREAMSTS_FLAGS_NONE);
    2088 
    2089     PDMAUDIOSTREAMSTS fStrmStatus = PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
     2087    AssertPtrReturn(pStreamWas, PDMAUDIOSTREAM_STS_NONE);
     2088
     2089    uint32_t fStrmStatus = PDMAUDIOSTREAM_STS_INITIALIZED;
    20902090    if (pStreamWas->fEnabled)
    2091         fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     2091        fStrmStatus |= PDMAUDIOSTREAM_STS_ENABLED;
    20922092    if (pStreamWas->fDraining)
    2093         fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE;
     2093        fStrmStatus |= PDMAUDIOSTREAM_STS_PENDING_DISABLE;
    20942094    if (pStreamWas->fRestartOnResume)
    2095         fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_PAUSED;
     2095        fStrmStatus |= PDMAUDIOSTREAM_STS_PAUSED;
    20962096
    20972097    LogFlowFunc(("returns %#x for '%s' {%s}\n", fStrmStatus, pStreamWas->Cfg.szName, drvHostWasStreamStatusString(pStreamWas)));
  • trunk/src/VBox/Main/src-client/DrvAudioRec.cpp

    r88718 r88724  
    611611 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    612612 */
    613 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioVideoRecHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface,
    614                                                                           PPDMAUDIOBACKENDSTREAM pStream)
     613static DECLCALLBACK(uint32_t) drvAudioVideoRecHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    615614{
    616615    RT_NOREF(pInterface, pStream);
    617     return PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED | PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     616    return PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED;
    618617}
    619618
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r88718 r88724  
    531531 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    532532 */
    533 static DECLCALLBACK(PDMAUDIOSTREAMSTS) drvAudioVrdeHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     533static DECLCALLBACK(uint32_t) drvAudioVrdeHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    534534{
    535535    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
    536536    RT_NOREF(pStream);
    537537
    538     PDMAUDIOSTREAMSTS fStrmStatus = PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED;
    539 
     538    uint32_t fStrmStatus = PDMAUDIOSTREAM_STS_INITIALIZED;
    540539    if (pDrv->cClients) /* If any clients are connected, flag the stream as enabled. */
    541        fStrmStatus |= PDMAUDIOSTREAMSTS_FLAGS_ENABLED;
     540       fStrmStatus |= PDMAUDIOSTREAM_STS_ENABLED;
    542541
    543542    return fStrmStatus;
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