VirtualBox

Changeset 88724 in vbox for trunk/include/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/include/VBox/vmm
Files:
2 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
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