VirtualBox

Changeset 70640 in vbox


Ignore:
Timestamp:
Jan 19, 2018 12:14:12 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120370
Message:

Audio: Added VERR_AUDIO_BACKEND_NOT_ATTACHED and support for it in PDMIAUDIOCONNECTOR::pfnGetStatus() and AudioMixerSinkCreateStream().

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r68226 r70640  
    44
    55/*
    6  * Copyright (C) 2006-2017 Oracle Corporation
     6 * Copyright (C) 2006-2018 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    27782778 *  NULL audio driver. */
    27792779#define VERR_AUDIO_BACKEND_INIT_FAILED              (-6600)
     2780/** No host backend attached / available. */
     2781#define VERR_AUDIO_BACKEND_NOT_ATTACHED             (-6605)
    27802782/** No free input streams.  */
    27812783#define VERR_AUDIO_NO_FREE_INPUT_STREAMS            (-6601)
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r69119 r70640  
    588588    /** @todo Validate fFlags. */
    589589    /* ppStream is optional. */
     590
     591    if (pConn->pfnGetStatus(pConn, PDMAUDIODIR_ANY) == PDMAUDIOBACKENDSTS_NOT_ATTACHED)
     592        return VERR_AUDIO_BACKEND_NOT_ATTACHED;
    590593
    591594    PAUDMIXSTREAM pMixStream = (PAUDMIXSTREAM)RTMemAllocZ(sizeof(AUDMIXSTREAM));
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r70639 r70640  
    27662766    if (RT_SUCCESS(rc))
    27672767    {
    2768         if (   pThis->pHostDrvAudio
    2769             && pThis->pHostDrvAudio->pfnGetStatus)
    2770         {
    2771              backendSts = pThis->pHostDrvAudio->pfnGetStatus(pThis->pHostDrvAudio, enmDir);
    2772         }
     2768        if (pThis->pHostDrvAudio)
     2769        {
     2770            if (pThis->pHostDrvAudio->pfnGetStatus)
     2771                backendSts = pThis->pHostDrvAudio->pfnGetStatus(pThis->pHostDrvAudio, enmDir);
     2772        }
     2773        else
     2774            backendSts = PDMAUDIOBACKENDSTS_NOT_ATTACHED;
    27732775
    27742776        int rc2 = RTCritSectLeave(&pThis->CritSect);
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