Changeset 90900 in vbox for trunk/src/VBox/ValidationKit/utils/audio
- Timestamp:
- Aug 26, 2021 8:02:46 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdSelfTest.cpp
r90899 r90900 129 129 PSELFTESTCTX pCtx = (PSELFTESTCTX)pvUser; 130 130 131 PAUDIOTESTENV pTstEnv = &pCtx->Guest.TstEnv;131 PAUDIOTESTENV pTstEnvGst = &pCtx->Guest.TstEnv; 132 132 133 133 /* Flag the environment for self test mode. */ 134 pTstEnv ->fSelftest = true;134 pTstEnvGst->fSelftest = true; 135 135 136 136 /* Tweak the address the guest ATS is trying to connect to the host if anything else is specified. 137 137 * Note: The host also runs on the same host (this self-test is completely self-contained and does not need a VM). */ 138 if (!pTstEnv ->TcpOpts.szConnectAddr[0])139 RTStrCopy(pTstEnv ->TcpOpts.szConnectAddr, sizeof(pTstEnv->TcpOpts.szConnectAddr), "127.0.0.1");140 141 int rc = AudioTestSvcCreate(&pTstEnv ->Srv);138 if (!pTstEnvGst->TcpOpts.szConnectAddr[0]) 139 RTStrCopy(pTstEnvGst->TcpOpts.szConnectAddr, sizeof(pTstEnvGst->TcpOpts.szConnectAddr), "127.0.0.1"); 140 141 int rc = AudioTestSvcCreate(&pTstEnvGst->Srv); 142 142 AssertRCReturn(rc, rc); 143 143 144 144 /* Generate tag for guest side. */ 145 rc = RTStrCopy(pTstEnv ->szTag, sizeof(pTstEnv->szTag), pCtx->szTag);145 rc = RTStrCopy(pTstEnvGst->szTag, sizeof(pTstEnvGst->szTag), pCtx->szTag); 146 146 AssertRCReturn(rc, rc); 147 147 148 rc = AudioTestPathCreateTemp(pTstEnv ->szPathTemp, sizeof(pTstEnv->szPathTemp), "selftest-guest");148 rc = AudioTestPathCreateTemp(pTstEnvGst->szPathTemp, sizeof(pTstEnvGst->szPathTemp), "selftest-guest"); 149 149 AssertRCReturn(rc, rc); 150 150 151 rc = AudioTestPathCreateTemp(pTstEnv ->szPathOut, sizeof(pTstEnv->szPathOut), "selftest-out");151 rc = AudioTestPathCreateTemp(pTstEnvGst->szPathOut, sizeof(pTstEnvGst->szPathOut), "selftest-out"); 152 152 AssertRCReturn(rc, rc); 153 153 154 pTstEnv ->enmMode = AUDIOTESTMODE_GUEST;154 pTstEnvGst->enmMode = AUDIOTESTMODE_GUEST; 155 155 156 156 /** @todo Make this customizable. */ 157 PDMAudioPropsInit(&pTstEnv ->Props,157 PDMAudioPropsInit(&pTstEnvGst->Props, 158 158 2 /* 16-bit */, true /* fSigned */, 2 /* cChannels */, 44100 /* uHz */); 159 159 160 rc = audioTestEnvInit(pTstEnv , &pCtx->DrvStack);160 rc = audioTestEnvInit(pTstEnvGst, &pCtx->DrvStack); 161 161 if (RT_SUCCESS(rc)) 162 162 { 163 163 RTThreadUserSignal(hThread); 164 164 165 audioTestWorker(pTstEnv );166 audioTestEnvDestroy(pTstEnv );165 audioTestWorker(pTstEnvGst); 166 audioTestEnvDestroy(pTstEnvGst); 167 167 } 168 168
Note:
See TracChangeset
for help on using the changeset viewer.