VirtualBox

Changeset 89487 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 3, 2021 8:16:17 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Changed PDMIHOSTAUDIO::pfnStreamCreate to take a pointer to a const pCfgReq parameter. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp

    r89481 r89487  
    338338 * @param   pProps              Internal audio PCM configuration to convert.
    339339 */
    340 static snd_pcm_format_t alsaAudioPropsToALSA(PPDMAUDIOPCMPROPS pProps)
     340static snd_pcm_format_t alsaAudioPropsToALSA(PCPDMAUDIOPCMPROPS pProps)
    341341{
    342342    switch (PDMAudioPropsSampleSize(pProps))
     
    680680 */
    681681static DECLCALLBACK(int) drvHstAudAlsaHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    682                                                       PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     682                                                      PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    683683{
    684684    PDRVHSTAUDALSA pThis = RT_FROM_MEMBER(pInterface, DRVHSTAUDALSA, IHostAudio);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp

    r89344 r89487  
    15161516 */
    15171517static DECLCALLBACK(int) drvHstAudCaHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1518                                                     PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     1518                                                    PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    15191519{
    15201520    PDRVHOSTCOREAUDIO pThis     = RT_FROM_MEMBER(pInterface, DRVHOSTCOREAUDIO, IHostAudio);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp

    r89421 r89487  
    14501450 *                      actual stream format on successful return.
    14511451 */
    1452 static HRESULT drvHostDSoundStreamCreateCapture(PDRVHOSTDSOUND pThis, PDSOUNDSTREAM pStreamDS, PPDMAUDIOSTREAMCFG pCfgReq,
     1452static HRESULT drvHostDSoundStreamCreateCapture(PDRVHOSTDSOUND pThis, PDSOUNDSTREAM pStreamDS, PCPDMAUDIOSTREAMCFG pCfgReq,
    14531453                                                PPDMAUDIOSTREAMCFG pCfgAcq, WAVEFORMATEXTENSIBLE *pWaveFmtExt)
    14541454{
     
    15701570 *                      return.
    15711571 */
    1572 static HRESULT drvHostDSoundStreamCreatePlayback(PDRVHOSTDSOUND pThis, PDSOUNDSTREAM pStreamDS, PPDMAUDIOSTREAMCFG pCfgReq,
     1572static HRESULT drvHostDSoundStreamCreatePlayback(PDRVHOSTDSOUND pThis, PDSOUNDSTREAM pStreamDS, PCPDMAUDIOSTREAMCFG pCfgReq,
    15731573                                                 PPDMAUDIOSTREAMCFG pCfgAcq, WAVEFORMATEXTENSIBLE *pWaveFmtExt)
    15741574{
     
    16841684 */
    16851685static DECLCALLBACK(int) drvHostDSoundHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1686                                                       PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     1686                                                      PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    16871687{
    16881688    PDRVHOSTDSOUND pThis     = RT_FROM_MEMBER(pInterface, DRVHOSTDSOUND, IHostAudio);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp

    r89485 r89487  
    104104 */
    105105static DECLCALLBACK(int) drvHstAudDebugHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    106                                                           PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     106                                                       PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    107107{
    108108    PDRVHSTAUDDEBUG         pThis      = RT_FROM_MEMBER(pInterface, DRVHSTAUDDEBUG, IHostAudio);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp

    r89484 r89487  
    8383 */
    8484static DECLCALLBACK(int) drvHstAudNullHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    85                                                       PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     85                                                      PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    8686{
    8787    RT_NOREF(pInterface);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioOss.cpp

    r89479 r89487  
    352352 */
    353353static DECLCALLBACK(int) drvHstAudOssHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    354                                                      PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     354                                                     PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    355355{
    356356    AssertPtr(pInterface); RT_NOREF(pInterface);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp

    r89483 r89487  
    10941094 */
    10951095static DECLCALLBACK(int) drvHstAudPaHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1096                                                     PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     1096                                                    PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    10971097{
    10981098    PDRVHSTAUDPA        pThis     = RT_FROM_MEMBER(pInterface, DRVHSTAUDPA, IHostAudio);
     
    12151215             */
    12161216            for (iDst = 0; iDst < pStreamPA->ChannelMap.channels; iDst++)
    1217                  pCfgReq->Props.aidChannels[iDst] = drvHstAudPaConvertChannelPos(pStreamPA->ChannelMap.map[iDst]);
    1218             while (iDst < RT_ELEMENTS(pCfgReq->Props.aidChannels))
    1219                 pCfgReq->Props.aidChannels[iDst++] = PDMAUDIOCHANNELID_INVALID;
     1217                 pCfgAcq->Props.aidChannels[iDst] = drvHstAudPaConvertChannelPos(pStreamPA->ChannelMap.map[iDst]);
     1218            while (iDst < RT_ELEMENTS(pCfgAcq->Props.aidChannels))
     1219                pCfgAcq->Props.aidChannels[iDst++] = PDMAUDIOCHANNELID_INVALID;
    12201220
    12211221            PDMAudioStrmCfgCopy(&pStreamPA->Cfg, pCfgAcq);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r89469 r89487  
    334334
    335335
    336 static int drvHostValKitAudioCreateStreamIn(PDRVHOSTVALKITAUDIO pThis, PVALKITAUDIOSTREAM pStreamDbg,
    337                                             PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    338 {
    339     RT_NOREF(pThis, pStreamDbg, pCfgReq, pCfgAcq);
    340 
    341     return VINF_SUCCESS;
    342 }
    343 
    344 
    345 static int drvHostValKitAudioCreateStreamOut(PDRVHOSTVALKITAUDIO pThis, PVALKITAUDIOSTREAM pStreamDbg,
    346                                              PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    347 {
    348     RT_NOREF(pThis, pStreamDbg, pCfgReq, pCfgAcq);
    349 
    350     return VINF_SUCCESS;
    351 }
    352 
    353 
    354336/**
    355337 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
    356338 */
    357339static DECLCALLBACK(int) drvHostValKitAudioHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    358                                                            PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     340                                                           PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    359341{
    360342    PDRVHOSTVALKITAUDIO pThis      = RT_FROM_MEMBER(pInterface, DRVHOSTVALKITAUDIO, IHostAudio);
     
    363345    AssertPtrReturn(pCfgReq, VERR_INVALID_POINTER);
    364346    AssertPtrReturn(pCfgAcq, VERR_INVALID_POINTER);
    365 
    366     int rc;
    367     if (pCfgReq->enmDir == PDMAUDIODIR_IN)
    368         rc = drvHostValKitAudioCreateStreamIn( pThis, pStreamDbg, pCfgReq, pCfgAcq);
    369     else
    370         rc = drvHostValKitAudioCreateStreamOut(pThis, pStreamDbg, pCfgReq, pCfgAcq);
     347    RT_NOREF(pThis);
     348
     349    int rc = VINF_SUCCESS;
    371350    PDMAudioStrmCfgCopy(&pStreamDbg->Cfg, pCfgAcq);
    372351    return rc;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp

    r89420 r89487  
    17941794 */
    17951795static DECLCALLBACK(int) drvHostAudioWasHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1796                                                         PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     1796                                                        PCPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    17971797{
    17981798    PDRVHOSTAUDIOWAS        pThis      = RT_FROM_MEMBER(pInterface, DRVHOSTAUDIOWAS, IHostAudio);
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