VirtualBox

Changeset 88458 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 12, 2021 9:23:30 AM (4 years ago)
Author:
vboxsync
Message:

DrvHostAudioValidationKit: Forgot to fix the pCfg stream member. bugref:9890

File:
1 edited

Legend:

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

    r88456 r88458  
    4444{
    4545    /** The stream's acquired configuration. */
    46     PPDMAUDIOSTREAMCFG  pCfg;
     46    PDMAUDIOSTREAMCFG   Cfg;
    4747    /** Audio file to dump output to or read input from. */
    4848    PAUDIOHLPFILE       pFile;
     
    207207    else
    208208        rc = drvHostValKitAudioCreateStreamOut(pThis, pStreamDbg, pCfgReq, pCfgAcq);
    209     if (RT_SUCCESS(rc))
    210     {
    211         pStreamDbg->pCfg = PDMAudioStrmCfgDup(pCfgAcq);
    212         if (!pStreamDbg->pCfg)
    213             rc = VERR_NO_MEMORY;
    214     }
    215 
     209    PDMAudioStrmCfgCopy(&pStreamDbg->Cfg, pCfgAcq);
    216210    return rc;
    217211}
     
    227221    AssertPtrReturn(pStreamDbg, VERR_INVALID_POINTER);
    228222
    229     if (   pStreamDbg->pCfg->enmDir == PDMAUDIODIR_OUT
     223    if (   pStreamDbg->Cfg.enmDir == PDMAUDIODIR_OUT
    230224        && pStreamDbg->Out.pbPlayBuffer)
    231225    {
     
    248242        RTStrmClose(pStreamDbg->pFileTiming);
    249243        pStreamDbg->pFileTiming = NULL;
    250     }
    251 
    252     if (pStreamDbg->pCfg)
    253     {
    254         PDMAudioStrmCfgFree(pStreamDbg->pCfg);
    255         pStreamDbg->pCfg = NULL;
    256244    }
    257245
     
    328316
    329317    // Microseconds are used everythere below
    330     uint32_t const cFrames = PDMAudioPropsBytesToFrames(&pStreamDbg->pCfg->Props, cbBuf);
     318    uint32_t const cFrames = PDMAudioPropsBytesToFrames(&pStreamDbg->Cfg.Props, cbBuf);
    331319    RTStrmPrintf(pStreamDbg->pFileTiming, "%d %d %d %d\n",
    332320                 // Host time elapsed since Guest submitted the first buffer for playback:
    333321                 (uint32_t)(cNsSinceStart / 1000),
    334322                 // how long all the samples submitted previously were played:
    335                  (uint32_t)(pStreamDbg->cFramesSinceStarted * 1.0E6 / pStreamDbg->pCfg->Props.uHz),
     323                 (uint32_t)(pStreamDbg->cFramesSinceStarted * 1.0E6 / pStreamDbg->Cfg.Props.uHz),
    336324                 // how long a new uSamplesReady samples should/will be played:
    337                  (uint32_t)(cFrames * 1.0E6 / pStreamDbg->pCfg->Props.uHz),
     325                 (uint32_t)(cFrames * 1.0E6 / pStreamDbg->Cfg.Props.uHz),
    338326                 cFrames);
    339327
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