VirtualBox

Ignore:
Timestamp:
May 5, 2021 11:38:58 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Changed PDMIHOSTAUDIO::pfnStreamGetStatus into pfnStreamGetState and defined a simpler state enum (PDMHOSTAUDIOSTREAMSTATE) that fits what DrvAudio needs and the backends actually want to tell us. Fixes one VRDE issue. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r88885 r88887  
    415415        }
    416416    }
    417     pDrv->pConsoleVRDPServer = NULL;
     417    pDrv->pConsoleVRDPServer = NULL;   /** @todo r=bird: WTF? */
    418418
    419419    return VINF_SUCCESS;
     
    595595
    596596/**
    597  * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
    598  */
    599 static DECLCALLBACK(uint32_t) drvAudioVrdeHA_StreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     597 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetState}
     598 */
     599static DECLCALLBACK(PDMHOSTAUDIOSTREAMSTATE) drvAudioVrdeHA_StreamGetState(PPDMIHOSTAUDIO pInterface,
     600                                                                           PPDMAUDIOBACKENDSTREAM pStream)
    600601{
    601602    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
    602     RT_NOREF(pStream);
    603 
    604     return pDrv->cClients > 0
    605          ? PDMAUDIOSTREAM_STS_INITIALIZED | PDMAUDIOSTREAM_STS_ENABLED
    606 #if 0 /* later mabye */ /** @todo r=bird: Weird backend status mess. */
    607          : PDMAUDIOSTREAM_STS_NONE /* play possum if the clients all disappears. Re-init should be underways. */;
    608 #else
    609          : PDMAUDIOSTREAM_STS_INITIALIZED /* If any clients are connected, flag the stream as enabled. */;
    610 #endif
     603    AssertPtrReturn(pStream, PDMHOSTAUDIOSTREAMSTATE_INVALID);
     604
     605    return pDrv->cClients > 0 ? PDMHOSTAUDIOSTREAMSTATE_OKAY : PDMHOSTAUDIOSTREAMSTATE_INACTIVE;
    611606}
    612607
     
    806801    pThis->IHostAudio.pfnStreamGetWritable          = drvAudioVrdeHA_StreamGetWritable;
    807802    pThis->IHostAudio.pfnStreamGetPending           = NULL;
    808     pThis->IHostAudio.pfnStreamGetStatus            = drvAudioVrdeHA_StreamGetStatus;
     803    pThis->IHostAudio.pfnStreamGetState             = drvAudioVrdeHA_StreamGetState;
    809804    pThis->IHostAudio.pfnStreamPlay                 = drvAudioVrdeHA_StreamPlay;
    810805    pThis->IHostAudio.pfnStreamCapture              = drvAudioVrdeHA_StreamCapture;
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