VirtualBox

Changeset 88534 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Apr 15, 2021 12:16:56 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143810
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/src/VBox/Devices/Audio
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • 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. */
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