Changeset 88458 in vbox for trunk/src/VBox
- Timestamp:
- Apr 12, 2021 9:23:30 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r88456 r88458 44 44 { 45 45 /** The stream's acquired configuration. */ 46 P PDMAUDIOSTREAMCFG pCfg;46 PDMAUDIOSTREAMCFG Cfg; 47 47 /** Audio file to dump output to or read input from. */ 48 48 PAUDIOHLPFILE pFile; … … 207 207 else 208 208 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); 216 210 return rc; 217 211 } … … 227 221 AssertPtrReturn(pStreamDbg, VERR_INVALID_POINTER); 228 222 229 if ( pStreamDbg-> pCfg->enmDir == PDMAUDIODIR_OUT223 if ( pStreamDbg->Cfg.enmDir == PDMAUDIODIR_OUT 230 224 && pStreamDbg->Out.pbPlayBuffer) 231 225 { … … 248 242 RTStrmClose(pStreamDbg->pFileTiming); 249 243 pStreamDbg->pFileTiming = NULL; 250 }251 252 if (pStreamDbg->pCfg)253 {254 PDMAudioStrmCfgFree(pStreamDbg->pCfg);255 pStreamDbg->pCfg = NULL;256 244 } 257 245 … … 328 316 329 317 // 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); 331 319 RTStrmPrintf(pStreamDbg->pFileTiming, "%d %d %d %d\n", 332 320 // Host time elapsed since Guest submitted the first buffer for playback: 333 321 (uint32_t)(cNsSinceStart / 1000), 334 322 // 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), 336 324 // 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), 338 326 cFrames); 339 327
Note:
See TracChangeset
for help on using the changeset viewer.