VirtualBox

Changeset 88884 in vbox for trunk/include/VBox


Ignore:
Timestamp:
May 5, 2021 6:27:18 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144219
Message:

DrvAudio,Mixer: Changed PDMIAUDIOCONNECTOR::pfnStreamGetStatus into pfnStreamGetState and defined a simpler state enum (PDMAUDIOSTREAMSTATE) that fits the Mixer's need and nothing more. PDMAUDIOSTREAM_STS_XXX will soon be DrvAudio internal. Changed some state checks in the mixer from ENABLED and ENABLED+WRITABLE/READABLE (probably more that needs adjusting). bugref:9890

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r88861 r88884  
    989989} PDMAUDIOBACKENDSTS;
    990990
     991/**
     992 * PDM audio stream state.
     993 *
     994 * This is all the mixer/device needs.  The PDMAUDIOSTREAM_STS_XXX stuff will
     995 * become DrvAudio internal state once the backend stuff is destilled out of it.
     996 *
     997 * @note    The value order is significant, don't change it willy-nilly.
     998 */
     999typedef enum PDMAUDIOSTREAMSTATE
     1000{
     1001    /** Invalid state value. */
     1002    PDMAUDIOSTREAMSTATE_INVALID = 0,
     1003    /** The stream is not operative and cannot be enabled. */
     1004    PDMAUDIOSTREAMSTATE_NOT_WORKING,
     1005    /** The stream needs to be re-initialized by the device/mixer
     1006     * (i.e. call PDMIAUDIOCONNECTOR::pfnStreamReInit). */
     1007    PDMAUDIOSTREAMSTATE_NEED_REINIT,
     1008    /** The stream is inactive (not enabled). */
     1009    PDMAUDIOSTREAMSTATE_INACTIVE,
     1010    /** The stream is enabled but nothing to read/write.
     1011     *  @todo not sure if we need this variant... */
     1012    PDMAUDIOSTREAMSTATE_ENABLED,
     1013    /** The stream is enabled and captured samples can be read. */
     1014    PDMAUDIOSTREAMSTATE_ENABLED_READABLE,
     1015    /** The stream is enabled and samples can be written for playback. */
     1016    PDMAUDIOSTREAMSTATE_ENABLED_WRITABLE,
     1017    /** End of valid states.   */
     1018    PDMAUDIOSTREAMSTATE_END,
     1019    /** Make sure the type is 32-bit wide. */
     1020    PDMAUDIOSTREAMSTATE_32BIT_HACK = 0x7fffffff
     1021} PDMAUDIOSTREAMSTATE;
     1022
    9911023/** @name PDMAUDIOSTREAM_CREATE_F_XXX
    9921024 * @{ */
     
    11901222
    11911223    /**
    1192      * Returns the status of a specific audio stream.
    1193      *
    1194      * @returns PDMAUDIOSTREAM_STS_XXX
     1224     * Returns the state of a specific audio stream (destilled status).
     1225     *
     1226     * @returns PDMAUDIOSTREAMSTATE value.
     1227     * @retval  PDMAUDIOSTREAMSTATE_INVALID if the input isn't valid (w/ assertion).
    11951228     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    11961229     * @param   pStream         Pointer to audio stream.
    11971230     */
    1198     DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
     1231    DECLR3CALLBACKMEMBER(PDMAUDIOSTREAMSTATE, pfnStreamGetState, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
    11991232
    12001233    /**
     
    12501283
    12511284/** PDMIAUDIOCONNECTOR interface ID. */
    1252 #define PDMIAUDIOCONNECTOR_IID                  "ff6788cc-1a4d-4d4b-a2e0-9f56fce9b397"
     1285#define PDMIAUDIOCONNECTOR_IID                  "5bd85091-e99c-4092-acea-f0c5e9872408"
    12531286
    12541287
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r88850 r88884  
    11841184
    11851185/**
    1186  * Checks if the stream status is a read-to-operate one.
     1186 * Checks if the stream status is a ready-to-operate one.
    11871187 *
    11881188 * @returns @c true if ready to operate, @c false if not.
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