Changeset 89490 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Jun 3, 2021 11:00:04 PM (4 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r89467 r89490 1960 1960 { 1961 1961 if (g_uVerbosity > 0) 1962 RTMsgInfo("Stream: %s cbBackend=%#RX32%s\n", PDMAudioPropsToString(&pStream->Props, szTmp, sizeof(szTmp)), 1962 RTMsgInfo("Stream: %s cbBackend=%#RX32%s\n", 1963 PDMAudioPropsToString(&pStream->Cfg.Props, szTmp, sizeof(szTmp)), 1963 1964 pStream->cbBackend, fWithMixer ? " mixed" : ""); 1964 1965 … … 2247 2248 char szTmp[128]; 2248 2249 if (g_uVerbosity > 0) 2249 RTMsgInfo("Stream: %s cbBackend=%#RX32%s\n", PDMAudioPropsToString(&pStream->Props, szTmp, sizeof(szTmp)), 2250 RTMsgInfo("Stream: %s cbBackend=%#RX32%s\n", 2251 PDMAudioPropsToString(&pStream->Cfg.Props, szTmp, sizeof(szTmp)), 2250 2252 pStream->cbBackend, fWithMixer ? " mixed" : ""); 2251 2253 -
trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp
r89466 r89490 579 579 * success (not used as input). 580 580 */ 581 static int audioTestDriverStackStreamCreate(PAUDIOTESTDRVSTACK pDrvStack, P PDMAUDIOSTREAMCFG pCfgReq,581 static int audioTestDriverStackStreamCreate(PAUDIOTESTDRVSTACK pDrvStack, PCPDMAUDIOSTREAMCFG pCfgReq, 582 582 PPDMAUDIOSTREAM *ppStream, PPDMAUDIOSTREAMCFG pCfgAcq) 583 583 { … … 591 591 * DrvAudio does most of the work here. 592 592 */ 593 PDMAUDIOSTREAMCFG CfgGst = *pCfgReq; 594 rc = pDrvStack->pIAudioConnector->pfnStreamCreate(pDrvStack->pIAudioConnector, PDMAUDIOSTREAM_CREATE_F_NO_MIXBUF, 595 pCfgReq, &CfgGst, ppStream); 593 rc = pDrvStack->pIAudioConnector->pfnStreamCreate(pDrvStack->pIAudioConnector, 0 /*fFlags*/, pCfgReq, ppStream); 596 594 if (RT_SUCCESS(rc)) 597 595 { 598 *pCfgAcq = *pCfgReq; /** @todo PDMIAUDIOCONNECTOR::pfnStreamCreate only does one utterly pointless change to the two configs (enmLayout) from what I can tell... */ 599 pCfgAcq->Props = (*ppStream)->Props; 596 *pCfgAcq = (*ppStream)->Cfg; 600 597 RTMsgInfo("Created backend stream: %s\n", PDMAudioStrmCfgToString(pCfgReq, szTmp, sizeof(szTmp))); 601 598 return rc; … … 623 620 { 624 621 pStreamAt->Core.uMagic = PDMAUDIOSTREAM_MAGIC; 625 pStreamAt->Core. enmDir = pCfgReq->enmDir;622 pStreamAt->Core.Cfg = *pCfgReq; 626 623 pStreamAt->Core.cbBackend = cbStream; 627 pStreamAt->Core.Props = pCfgReq->Props;628 RTStrPrintf(pStreamAt->Core.szName, sizeof(pStreamAt->Core.szName), pCfgReq->szName);629 624 630 625 pStreamAt->Backend.uMagic = PDMAUDIOBACKENDSTREAM_MAGIC; … … 634 629 * Call the backend to create the stream. 635 630 */ 636 pStreamAt->Cfg = *pCfgReq;637 638 631 rc = pDrvStack->pIHostAudio->pfnStreamCreate(pDrvStack->pIHostAudio, &pStreamAt->Backend, 639 pCfgReq, &pStreamAt->C fg);632 pCfgReq, &pStreamAt->Core.Cfg); 640 633 if (RT_SUCCESS(rc)) 641 634 { 642 pStreamAt->Core.Props = pStreamAt->Cfg.Props;643 635 if (g_uVerbosity > 1) 644 636 RTMsgInfo("Created backend stream: %s\n", 645 PDMAudioStrmCfgToString(&pStreamAt->C fg, szTmp, sizeof(szTmp)));637 PDMAudioStrmCfgToString(&pStreamAt->Core.Cfg, szTmp, sizeof(szTmp))); 646 638 647 639 /* Return if stream is ready: */ … … 649 641 { 650 642 *ppStream = &pStreamAt->Core; 651 *pCfgAcq = pStreamAt->C fg;643 *pCfgAcq = pStreamAt->Core.Cfg; 652 644 return VINF_SUCCESS; 653 645 } … … 662 654 { 663 655 *ppStream = &pStreamAt->Core; 664 *pCfgAcq = pStreamAt->C fg;656 *pCfgAcq = pStreamAt->Core.Cfg; 665 657 return VINF_SUCCESS; 666 658 } … … 1144 1136 if (!pProps) 1145 1137 { 1146 pMix->pProps = &pStream-> Props;1138 pMix->pProps = &pStream->Cfg.Props; 1147 1139 return VINF_SUCCESS; 1148 1140 } … … 1158 1150 pMix->pProps = &pMix->MixBuf.Props; 1159 1151 1160 if (pStream-> enmDir == PDMAUDIODIR_IN)1152 if (pStream->Cfg.enmDir == PDMAUDIODIR_IN) 1161 1153 { 1162 1154 rc = AudioMixBufInitPeekState(&pMix->MixBuf, &pMix->PeekState, &pMix->MixBuf.Props); 1163 1155 if (RT_SUCCESS(rc)) 1164 1156 { 1165 rc = AudioMixBufInitWriteState(&pMix->MixBuf, &pMix->WriteState, &pStream-> Props);1157 rc = AudioMixBufInitWriteState(&pMix->MixBuf, &pMix->WriteState, &pStream->Cfg.Props); 1166 1158 if (RT_SUCCESS(rc)) 1167 1159 return rc; 1168 1160 } 1169 1161 } 1170 else if (pStream-> enmDir == PDMAUDIODIR_OUT)1162 else if (pStream->Cfg.enmDir == PDMAUDIODIR_OUT) 1171 1163 { 1172 1164 rc = AudioMixBufInitWriteState(&pMix->MixBuf, &pMix->WriteState, &pMix->MixBuf.Props); 1173 1165 if (RT_SUCCESS(rc)) 1174 1166 { 1175 rc = AudioMixBufInitPeekState(&pMix->MixBuf, &pMix->PeekState, &pStream-> Props);1167 rc = AudioMixBufInitPeekState(&pMix->MixBuf, &pMix->PeekState, &pStream->Cfg.Props); 1176 1168 if (RT_SUCCESS(rc)) 1177 1169 return rc; … … 1216 1208 { 1217 1209 uint8_t abBuf[16384]; 1218 if (pMix->pStream-> enmDir == PDMAUDIODIR_IN)1219 { 1220 //uint32_t const cbBuf = PDMAudioPropsFloorBytesToFrame(&pMix->pStream-> Props, sizeof(abBuf));1210 if (pMix->pStream->Cfg.enmDir == PDMAUDIODIR_IN) 1211 { 1212 //uint32_t const cbBuf = PDMAudioPropsFloorBytesToFrame(&pMix->pStream->Cfg.Props, sizeof(abBuf)); 1221 1213 1222 1214 } -
trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h
r89466 r89490 68 68 /** The public stream data. */ 69 69 PDMAUDIOSTREAM Core; 70 /** The acquired config. */71 PDMAUDIOSTREAMCFG Cfg;72 70 /** The backend data (variable size). */ 73 71 PDMAUDIOBACKENDSTREAM Backend;
Note:
See TracChangeset
for help on using the changeset viewer.