VirtualBox

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


Ignore:
Timestamp:
Jun 24, 2021 11:43:47 AM (4 years ago)
Author:
vboxsync
Message:

DevIchAc97: Hint 48kHz config to the windows backend. bugref:9890

File:
1 edited

Legend:

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

    r89855 r89886  
    41664166                if (ppDrv)
    41674167                    *ppDrv = pDrv;
     4168
     4169                /*
     4170                 * While we're here, give the windows backends a hint about our typical playback
     4171                 * configuration.
     4172                 */
     4173                if (   pDrv->pConnector
     4174                    && pDrv->pConnector->pfnStreamConfigHint)
     4175                {
     4176                    /* 48kHz */
     4177                    PDMAUDIOSTREAMCFG Cfg;
     4178                    RT_ZERO(Cfg);
     4179                    Cfg.enmDir                        = PDMAUDIODIR_OUT;
     4180                    Cfg.enmPath                       = PDMAUDIOPATH_OUT_FRONT;
     4181                    Cfg.Device.cMsSchedulingHint      = 5;
     4182                    Cfg.Backend.cFramesPreBuffering   = UINT32_MAX;
     4183                    PDMAudioPropsInit(&Cfg.Props, 2, true /*fSigned*/, 2, 48000);
     4184                    RTStrPrintf(Cfg.szName, sizeof(Cfg.szName), "output 48kHz 2ch S16 (HDA config hint)");
     4185
     4186                    pDrv->pConnector->pfnStreamConfigHint(pDrv->pConnector, &Cfg); /* (may trash CfgReq) */
     4187# if 0
     4188                    /* 44.1kHz */
     4189                    RT_ZERO(Cfg);
     4190                    Cfg.enmDir                        = PDMAUDIODIR_OUT;
     4191                    Cfg.enmPath                       = PDMAUDIOPATH_OUT_FRONT;
     4192                    Cfg.Device.cMsSchedulingHint      = 10;
     4193                    Cfg.Backend.cFramesPreBuffering   = UINT32_MAX;
     4194                    PDMAudioPropsInit(&Cfg.Props, 2, true /*fSigned*/, 2, 44100);
     4195                    RTStrPrintf(Cfg.szName, sizeof(Cfg.szName), "output 44.1kHz 2ch S16 (HDA config hint)");
     4196
     4197                    pDrv->pConnector->pfnStreamConfigHint(pDrv->pConnector, &Cfg); /* (may trash CfgReq) */
     4198# endif
     4199                }
     4200
    41684201                LogFunc(("LUN#%u: returns VINF_SUCCESS (pCon=%p)\n", iLun, pDrv->pConnector));
    41694202                return VINF_SUCCESS;
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