VirtualBox

Changeset 89127 in vbox for trunk/src


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

ValKit/AudioTest: audioTestDriverStackStreamCreateOutput need to return the actual cMsSchedulingHint value when we supply it a default. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r89119 r89127  
    828828 * @param   cMsSchedulingHint   The scheduling hint in milliseconds.
    829829 * @param   ppStream            Where to return the stream pointer on success.
     830 * @param   pCfgAcq             Where to return the actual (well, not
     831 *                              necessarily when using DrvAudio, but probably
     832 *                              the same) stream config on success (not used as
     833 *                              input).
    830834 */
    831835static int audioTestDriverStackStreamCreateOutput(PAUDIOTESTDRVSTACK pDrvStack, PCPDMAUDIOPCMPROPS pProps,
    832836                                                  uint32_t cMsBufferSize, uint32_t cMsPreBuffer, uint32_t cMsSchedulingHint,
    833                                                   PPDMAUDIOSTREAM *ppStream)
     837                                                  PPDMAUDIOSTREAM *ppStream, PPDMAUDIOSTREAMCFG pCfgAcq)
    834838{
    835839    char szTmp[PDMAUDIOSTRMCFGTOSTRING_MAX + 16];
     
    881885        if (RT_SUCCESS(rc))
    882886        {
     887            *pCfgAcq = CfgReq; /** @todo PDMIAUDIOCONNECTOR::pfnStreamCreate only does one utterly pointless change to the two configs (enmLayout) from what I can tell... */
     888            pCfgAcq->Props = (*ppStream)->Props;
    883889            RTMsgInfo("Created backend stream: %s\n", PDMAudioStrmCfgToString(&CfgReq, szTmp, sizeof(szTmp)));
    884890            return rc;
     
    932938                        {
    933939                            *ppStream = &pStreamAt->Core;
     940                            *pCfgAcq  = pStreamAt->Cfg;
    934941                            return VINF_SUCCESS;
    935942                        }
     
    944951                            {
    945952                                *ppStream = &pStreamAt->Core;
     953                                *pCfgAcq  = pStreamAt->Cfg;
    946954                                return VINF_SUCCESS;
    947955                            }
     
    20492057         * Open a stream for the output.
    20502058         */
    2051         PPDMAUDIOSTREAM pStream = NULL;
     2059        PDMAUDIOSTREAMCFG CfgAcq;
     2060        PPDMAUDIOSTREAM   pStream = NULL;
    20522061        rc = audioTestDriverStackStreamCreateOutput(&DrvStack, &WaveFile.Props, cMsBufferSize,
    2053                                                     cMsPreBuffer, cMsSchedulingHint, &pStream);
     2062                                                    cMsPreBuffer, cMsSchedulingHint, &pStream, &CfgAcq);
    20542063        if (RT_SUCCESS(rc))
    20552064        {
     
    20982107                            }
    20992108                            else if (audioTestDriverStackStreamIsOkay(&DrvStack, pStream))
    2100                                 RTThreadSleep(RT_MIN(RT_MAX(1, cMsSchedulingHint), 256));
     2109                                RTThreadSleep(RT_MIN(RT_MAX(1, CfgAcq.Device.cMsSchedulingHint), 256));
    21012110                            else
    21022111                            {
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