VirtualBox

Changeset 88534 in vbox


Ignore:
Timestamp:
Apr 15, 2021 12:16:56 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Merged the cbStreamOut and cbStreamIn fields in PDMAUDIOBACKENDCFG (into cbStream). Added a fFlags member to PDMAUDIOBACKENDCFG, currently must-be-zero. bugref:9890

Location:
trunk
Files:
12 edited

Legend:

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

    r88464 r88534  
    437437    /** The backend's friendly name. */
    438438    char            szName[32];
    439     /** Size (in bytes) of the host backend's audio output stream structure. */
    440     size_t          cbStreamOut;
    441     /** Size (in bytes) of the host backend's audio input stream structure. */
    442     size_t          cbStreamIn;
     439    /** The size of the backend specific stream data (in bytes). */
     440    uint32_t        cbStream;
     441    /** Flags, MBZ. */
     442    uint32_t        fFlags;
    443443    /** Number of concurrent output (playback) streams supported on the host.
    444444     *  UINT32_MAX for unlimited concurrent streams, 0 if no concurrent input streams are supported. */
     
    12021202
    12031203/** PDMIAUDIOCONNECTOR interface ID. */
    1204 #define PDMIAUDIOCONNECTOR_IID                  "122511ca-deb3-4630-ad31-ade9f3177df4"
     1204#define PDMIAUDIOCONNECTOR_IID                  "473a3a3c-cda9-454c-90f9-63751320e62a"
    12051205
    12061206
     
    13621362
    13631363/** PDMIHOSTAUDIO interface ID. */
    1364 #define PDMIHOSTAUDIO_IID                           "cf04d235-2af6-4921-8323-a0f85c5cf96b"
     1364#define PDMIHOSTAUDIO_IID                           "71b1dcc3-46d7-4c27-a76a-63cd229adb74"
    13651365
    13661366
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88454 r88534  
    30003000     */
    30013001    uint32_t *pcFreeStreams;
    3002     size_t    cbHstStrm;
    30033002    if (pCfgHost->enmDir == PDMAUDIODIR_IN)
    30043003    {
     
    30093008        }
    30103009        pcFreeStreams = &pThis->In.cStreamsFree;
    3011         cbHstStrm     = pThis->BackendCfg.cbStreamIn;
    30123010    }
    30133011    else /* Out */
     
    30193017        }
    30203018        pcFreeStreams = &pThis->Out.cStreamsFree;
    3021         cbHstStrm     = pThis->BackendCfg.cbStreamOut;
    3022     }
     3019    }
     3020    size_t const cbHstStrm = pThis->BackendCfg.cbStream;
    30233021    AssertStmt(cbHstStrm < _16M, rc = VERR_OUT_OF_RANGE);
    30243022    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp

    r88453 r88534  
    240240     */
    241241    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "ALSA");
    242     pBackendCfg->cbStreamIn     = sizeof(ALSAAUDIOSTREAM);
    243     pBackendCfg->cbStreamOut    = sizeof(ALSAAUDIOSTREAM);
     242    pBackendCfg->cbStream       = sizeof(ALSAAUDIOSTREAM);
     243    pBackendCfg->fFlags         = 0;
    244244    /* ALSA allows exactly one input and one output used at a time for the selected device(s). */
    245245    pBackendCfg->cMaxStreamsIn  = 1;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp

    r88468 r88534  
    21622162static DECLCALLBACK(int) drvHostCoreAudioHA_GetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
    21632163{
    2164     AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
     2164    PDRVHOSTCOREAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTCOREAUDIO(pInterface);
    21652165    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    21662166
    2167     PDRVHOSTCOREAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTCOREAUDIO(pInterface);
    2168 
    2169     RT_BZERO(pBackendCfg, sizeof(PDMAUDIOBACKENDCFG));
    2170 
    2171     RTStrPrintf2(pBackendCfg->szName, sizeof(pBackendCfg->szName), "Core Audio");
    2172 
    2173     pBackendCfg->cbStreamIn  = sizeof(COREAUDIOSTREAM);
    2174     pBackendCfg->cbStreamOut = sizeof(COREAUDIOSTREAM);
    2175 
     2167    /*
     2168     * Fill in the config structure.
     2169     */
     2170    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "Core Audio");
     2171    pBackendCfg->cbStream       = sizeof(COREAUDIOSTREAM);
     2172    pBackendCfg->fFlags         = 0;
    21762173    /* For Core Audio we provide one stream per device for now. */
    21772174    pBackendCfg->cMaxStreamsIn  = PDMAudioHostEnumCountMatching(&pThis->Devices, PDMAUDIODIR_IN);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp

    r88514 r88534  
    685685    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    686686
    687     RT_BZERO(pBackendCfg, sizeof(PPDMAUDIOBACKENDCFG));
    688 
    689     pBackendCfg->cbStreamOut = sizeof(DSOUNDSTREAM);
    690     pBackendCfg->cbStreamIn  = sizeof(DSOUNDSTREAM);
    691 
    692     RTStrPrintf2(pBackendCfg->szName, sizeof(pBackendCfg->szName), "DirectSound");
    693 
     687
     688    /*
     689     * Fill in the config structure.
     690     */
     691    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "DirectSound");
     692    pBackendCfg->cbStream       = sizeof(DSOUNDSTREAM);
     693    pBackendCfg->fFlags         = 0;
    694694    pBackendCfg->cMaxStreamsIn  = UINT32_MAX;
    695695    pBackendCfg->cMaxStreamsOut = UINT32_MAX;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp

    r88462 r88534  
    106106    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    107107
     108    /*
     109     * Fill in the config structure.
     110     */
    108111    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "DebugAudio");
    109 
    110     pBackendCfg->cbStreamOut    = sizeof(DEBUGAUDIOSTREAM);
    111     pBackendCfg->cbStreamIn     = sizeof(DEBUGAUDIOSTREAM);
    112 
     112    pBackendCfg->cbStream       = sizeof(DEBUGAUDIOSTREAM);
     113    pBackendCfg->fFlags         = 0;
    113114    pBackendCfg->cMaxStreamsOut = 1; /* Output; writing to a file. */
    114115    pBackendCfg->cMaxStreamsIn  = 1; /* Input; generates a sine wave. */
  • trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp

    r88462 r88534  
    6969    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    7070
     71    /*
     72     * Fill in the config structure.
     73     */
    7174    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "NULL audio");
    72 
    73     pBackendCfg->cbStreamOut    = sizeof(NULLAUDIOSTREAM);
    74     pBackendCfg->cbStreamIn     = sizeof(NULLAUDIOSTREAM);
    75 
     75    pBackendCfg->cbStream       = sizeof(NULLAUDIOSTREAM);
     76    pBackendCfg->fFlags         = 0;
    7677    pBackendCfg->cMaxStreamsOut = 1; /* Output */
    7778    pBackendCfg->cMaxStreamsIn  = 2; /* Line input + microphone input. */
  • trunk/src/VBox/Devices/Audio/DrvHostAudioOss.cpp

    r88455 r88534  
    181181    RT_NOREF(pInterface);
    182182
     183    /*
     184     * Fill in the config structure.
     185     */
    183186    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "OSS");
    184 
    185     pBackendCfg->cbStreamIn  = sizeof(OSSAUDIOSTREAM);
    186     pBackendCfg->cbStreamOut = sizeof(OSSAUDIOSTREAM);
     187    pBackendCfg->cbStream       = sizeof(OSSAUDIOSTREAM);
     188    pBackendCfg->fFlags         = 0;
     189    pBackendCfg->cMaxStreamsIn  = 0;
     190    pBackendCfg->cMaxStreamsOut = 0;
    187191
    188192    int hFile = open("/dev/dsp", O_WRONLY | O_NONBLOCK, 0);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp

    r88513 r88534  
    646646     */
    647647    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "PulseAudio");
    648     pBackendCfg->cbStreamOut    = sizeof(PULSEAUDIOSTREAM);
    649     pBackendCfg->cbStreamIn     = sizeof(PULSEAUDIOSTREAM);
     648    pBackendCfg->cbStream       = sizeof(PULSEAUDIOSTREAM);
     649    pBackendCfg->fFlags         = 0;
    650650    pBackendCfg->cMaxStreamsOut = UINT32_MAX;
    651651    pBackendCfg->cMaxStreamsIn  = UINT32_MAX;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r88462 r88534  
    9696    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    9797
    98     RTStrPrintf2(pBackendCfg->szName, sizeof(pBackendCfg->szName), "Validation Kit");
    99 
    100     pBackendCfg->cbStreamOut    = sizeof(VAKITAUDIOSTREAM);
    101     pBackendCfg->cbStreamIn     = sizeof(VAKITAUDIOSTREAM);
    102 
     98    /*
     99     * Fill in the config structure.
     100     */
     101    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "Validation Kit");
     102    pBackendCfg->cbStream       = sizeof(VAKITAUDIOSTREAM);
     103    pBackendCfg->fFlags         = 0;
    103104    pBackendCfg->cMaxStreamsOut = 1; /* Output */
    104105    pBackendCfg->cMaxStreamsIn  = 0; /* No input supported yet. */
  • trunk/src/VBox/Main/src-client/DrvAudioRec.cpp

    r88459 r88534  
    365365    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    366366
    367     RTStrPrintf2(pBackendCfg->szName, sizeof(pBackendCfg->szName), "VideoRec");
    368 
    369     pBackendCfg->cbStreamOut    = sizeof(AVRECSTREAM);
    370     pBackendCfg->cbStreamIn     = 0;
     367    /*
     368     * Fill in the config structure.
     369     */
     370    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "VideoRec");
     371    pBackendCfg->cbStream       = sizeof(AVRECSTREAM);
     372    pBackendCfg->fFlags         = 0;
    371373    pBackendCfg->cMaxStreamsIn  = 0;
    372374    pBackendCfg->cMaxStreamsOut = UINT32_MAX;
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r88469 r88534  
    232232
    233233    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "VRDE");
    234     pBackendCfg->cbStreamOut    = sizeof(VRDESTREAM);
    235     pBackendCfg->cbStreamIn     = sizeof(VRDESTREAM);
     234    pBackendCfg->cbStream       = sizeof(VRDESTREAM);
     235    pBackendCfg->fFlags         = 0;
    236236    pBackendCfg->cMaxStreamsIn  = UINT32_MAX;
    237237    pBackendCfg->cMaxStreamsOut = UINT32_MAX;
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