VirtualBox

Changeset 89130 in vbox


Ignore:
Timestamp:
May 17, 2021 11:51:49 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144471
Message:

AudioMixer: Copy the 'Device' bits to the CfgHost when creating a stream - CoreAudio backend wants the scheduling hint. bugref:9890

File:
1 edited

Legend:

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

    r88994 r89130  
    574574    AssertPtrNullReturn(ppStream, VERR_INVALID_POINTER);
    575575    Assert(pSink->AIO.pDevIns == pDevIns); RT_NOREF(pDevIns); /* we'll probably be adding more statistics */
     576    AssertReturn(pCfg->enmDir == pSink->enmDir, VERR_MISMATCH);
    576577
    577578    /*
     
    611612
    612613                /*
    613                  * Initialize the host-side configuration for the stream to be created.
    614                  * Always use the sink's PCM audio format as the host side when creating a stream for it.
     614                 * Initialize the host-side configuration for the stream to be created,
     615                 * this is the sink format & direction with the src/dir, layout, name
     616                 * and device specific config copied from the guest side config (pCfg).
    615617                 */
    616618                AssertMsg(AudioHlpPcmPropsAreValid(&pSink->PCMProps),
     
    620622                rc = PDMAudioStrmCfgInitWithProps(&CfgHost, &pSink->PCMProps);
    621623                AssertRC(rc); /* cannot fail */
    622 
    623                 /* Apply the sink's direction for the configuration to use to create the stream. */
    624                 if (pSink->enmDir == PDMAUDIODIR_IN)
    625                 {
    626                     CfgHost.enmDir      = PDMAUDIODIR_IN;
    627                     CfgHost.u.enmSrc    = pCfg->u.enmSrc;
    628                     CfgHost.enmLayout   = pCfg->enmLayout;
    629                 }
    630                 else
    631                 {
    632                     CfgHost.enmDir      = PDMAUDIODIR_OUT;
    633                     CfgHost.u.enmDst    = pCfg->u.enmDst;
    634                     CfgHost.enmLayout   = pCfg->enmLayout;
    635                 }
    636 
     624                CfgHost.enmDir    = pSink->enmDir;
     625                CfgHost.u         = pCfg->u;
     626                CfgHost.enmLayout = pCfg->enmLayout;
     627                CfgHost.Device    = pCfg->Device;
    637628                RTStrCopy(CfgHost.szName, sizeof(CfgHost.szName), pCfg->szName);
    638629
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