Changeset 104622 in vbox
- Timestamp:
- May 14, 2024 11:21:57 AM (7 months ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r103492 r104622 133 133 VKAT_TEST_OPT_COUNT = 900, 134 134 VKAT_TEST_OPT_DEV, 135 VKAT_TEST_OPT_GUEST_ATS_ADDR,136 VKAT_TEST_OPT_GUEST_ATS_PORT,137 VKAT_TEST_OPT_HOST_ATS_ADDR,138 VKAT_TEST_OPT_HOST_ATS_PORT,139 135 VKAT_TEST_OPT_MODE, 140 136 VKAT_TEST_OPT_NO_AUDIO_OK, … … 192 188 { "--exclude", 'e', RTGETOPT_REQ_UINT32 }, 193 189 { "--exclude-all", 'a', RTGETOPT_REQ_NOTHING }, 194 { "--guest-ats-addr", VKAT_TEST_OPT_GUEST_ATS_ADDR, RTGETOPT_REQ_STRING },195 { "--guest-ats-port", VKAT_TEST_OPT_GUEST_ATS_PORT, RTGETOPT_REQ_UINT32 },196 { "--host-ats-address", VKAT_TEST_OPT_HOST_ATS_ADDR, RTGETOPT_REQ_STRING },197 { "--host-ats-port", VKAT_TEST_OPT_HOST_ATS_PORT, RTGETOPT_REQ_UINT32 },198 190 { "--include", 'i', RTGETOPT_REQ_UINT32 }, 199 191 { "--outdir", VKAT_TEST_OPT_OUTDIR, RTGETOPT_REQ_STRING }, … … 729 721 case VKAT_TEST_OPT_TONE_VOL_PERCENT: return "Test tone volume (percent)\n" 730 722 " Default: 100"; 731 case VKAT_TEST_OPT_GUEST_ATS_ADDR: return "Address of guest ATS to connect to\n"732 " Default: " ATS_TCP_DEF_CONNECT_GUEST_STR;733 case VKAT_TEST_OPT_GUEST_ATS_PORT: return "Port of guest ATS to connect to (needs NAT port forwarding)\n"734 " Default: 6042"; /* ATS_TCP_DEF_CONNECT_PORT_GUEST */735 case VKAT_TEST_OPT_HOST_ATS_ADDR: return "Address of host ATS to connect to\n"736 " Default: " ATS_TCP_DEF_CONNECT_HOST_ADDR_STR;737 case VKAT_TEST_OPT_HOST_ATS_PORT: return "Port of host ATS to connect to\n"738 " Default: 6052"; /* ATS_TCP_DEF_BIND_PORT_VALKIT */739 723 case VKAT_TEST_OPT_MODE: return "Test mode to use when running the tests\n" 740 724 " Available modes:\n" … … 790 774 bool fNoAudioOk = false; 791 775 792 const char *pszGuestTcpAddr = NULL;793 uint16_t uGuestTcpPort = ATS_TCP_DEF_BIND_PORT_GUEST;794 const char *pszValKitTcpAddr = NULL;795 uint16_t uValKitTcpPort = ATS_TCP_DEF_BIND_PORT_VALKIT;796 797 776 int ch; 798 777 RTGETOPTUNION ValueUnion; … … 820 799 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid test number %u passed to --exclude", ValueUnion.u32); 821 800 g_aTests[ValueUnion.u32].fExcluded = true; 822 break;823 824 case VKAT_TEST_OPT_GUEST_ATS_ADDR:825 pszGuestTcpAddr = ValueUnion.psz;826 break;827 828 case VKAT_TEST_OPT_GUEST_ATS_PORT:829 uGuestTcpPort = ValueUnion.u32;830 break;831 832 case VKAT_TEST_OPT_HOST_ATS_ADDR:833 pszValKitTcpAddr = ValueUnion.psz;834 break;835 836 case VKAT_TEST_OPT_HOST_ATS_PORT:837 uValKitTcpPort = ValueUnion.u32;838 801 break; 839 802 -
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdGeneric.cpp
r103352 r104622 206 206 * Do the enumeration. 207 207 */ 208 RTEXITCODE rcExit = RTEXITCODE_ FAILURE;208 RTEXITCODE rcExit = RTEXITCODE_SUCCESS; 209 209 210 210 if (DrvStack.pIHostAudio->pfnGetDevices) … … 246 246 audioTestDriverStackDelete(&DrvStack); 247 247 248 return RTEXITCODE_SUCCESS;248 return rcExit; 249 249 } 250 250 … … 302 302 uint64_t const cNsElapsed = RTTimeNanoTS() - nsStarted; 303 303 if (cNsWritten > cNsElapsed + RT_NS_10MS) 304 RTThreadSleep( (cNsWritten - cNsElapsed - RT_NS_10MS / 2) / RT_NS_1MS);304 RTThreadSleep(uint32_t(cNsWritten - cNsElapsed - RT_NS_10MS / 2) / RT_NS_1MS); 305 305 } 306 306 … … 820 820 else 821 821 { 822 cFramesCaptured = cMaxFrames - cFramesCaptured;822 cFramesCaptured = (uint32_t)cMaxFrames - cFramesCaptured; 823 823 cbCaptured = PDMAudioPropsFramesToBytes(pMix->pProps, cFramesCaptured); 824 824 } -
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r103570 r104622 605 605 uint64_t const cNsElapsed = nsNow - nsStarted; 606 606 if (cNsWritten > cNsElapsed + RT_NS_10MS) 607 RTThreadSleep( (cNsWritten - cNsElapsed - RT_NS_10MS / 2) / RT_NS_1MS);607 RTThreadSleep(uint32_t(cNsWritten - cNsElapsed - RT_NS_10MS / 2) / RT_NS_1MS); 608 608 } 609 609 -
trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp
r103352 r104622 1361 1361 else 1362 1362 cbToRead = PDMAudioPropsFramesToBytes(&pMix->pStream->Cfg.Props, 1363 (uint64_t)cDstFrames * PDMAudioPropsHz(&pMix->pStream->Cfg.Props)1363 cDstFrames * PDMAudioPropsHz(&pMix->pStream->Cfg.Props) 1364 1364 / PDMAudioPropsHz(&pMix->MixBuf.Props)); 1365 1365 cbToRead = RT_MIN(cbToRead, RT_MIN(cbReadable, cbBuf));
Note:
See TracChangeset
for help on using the changeset viewer.