Changeset 90776 in vbox for trunk/src/VBox/ValidationKit/utils/audio
- Timestamp:
- Aug 23, 2021 8:16:58 AM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r90766 r90776 127 127 VKAT_TEST_OPT_PCM_CHAN, 128 128 VKAT_TEST_OPT_PCM_SIGNED, 129 VKAT_TEST_OPT_PROBE_BACKENDS, 129 130 VKAT_TEST_OPT_TAG, 130 131 VKAT_TEST_OPT_TEMPDIR, … … 175 176 { "--pcm-hz", VKAT_TEST_OPT_PCM_HZ, RTGETOPT_REQ_UINT16 }, 176 177 { "--pcm-signed", VKAT_TEST_OPT_PCM_SIGNED, RTGETOPT_REQ_BOOL }, 178 { "--probe-backends", VKAT_TEST_OPT_PROBE_BACKENDS, RTGETOPT_REQ_NOTHING }, 177 179 { "--mode", VKAT_TEST_OPT_MODE, RTGETOPT_REQ_STRING }, 178 180 { "--no-verify", VKAT_TEST_OPT_NO_VERIFY, RTGETOPT_REQ_NOTHING }, … … 693 695 case VKAT_TEST_OPT_PCM_SIGNED: return "Specifies whether to use signed (true) or unsigned (false) samples\n" 694 696 " Default: true"; 697 case VKAT_TEST_OPT_PROBE_BACKENDS: return "Specifies whether to probe all (available) backends until a working one is found\n" 698 " Default: false"; 695 699 case VKAT_TEST_OPT_TAG: return "Specifies the test set tag to use"; 696 700 case VKAT_TEST_OPT_TEMPDIR: return "Specifies the temporary directory to use"; … … 722 726 uint32_t uPcmHz = 0; 723 727 bool fPcmSigned = true; 728 bool fProbeBackends = false; 724 729 725 730 const char *pszGuestTcpAddr = NULL; … … 821 826 break; 822 827 828 case VKAT_TEST_OPT_PROBE_BACKENDS: 829 fProbeBackends = ValueUnion.f; 830 break; 831 823 832 case VKAT_TEST_OPT_TAG: 824 833 pszTag = ValueUnion.psz; … … 858 867 859 868 AUDIOTESTDRVSTACK DrvStack; 860 rc = audioTestDriverStackInitEx(&DrvStack, pDrvReg, 861 true /* fEnabledIn */, true /* fEnabledOut */, fWithDrvAudio); /** @todo Make in/out configurable, too. */ 869 for (size_t i = 0; i < RT_ELEMENTS(g_aBackends); i++) 870 { 871 if (fProbeBackends) 872 { 873 pDrvReg = g_aBackends[i].pDrvReg; 874 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Probing for backend '%s' ...\n", g_aBackends[i].pszName); 875 } 876 rc = audioTestDriverStackInitEx(&DrvStack, pDrvReg, 877 true /* fEnabledIn */, true /* fEnabledOut */, fWithDrvAudio); /** @todo Make in/out configurable, too. */ 878 if (RT_SUCCESS(rc)) 879 { 880 if (fProbeBackends) 881 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Probing backend '%s' successful\n", g_aBackends[i].pszName); 882 break; 883 } 884 if (fProbeBackends) 885 { 886 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Probing backend '%s' failed with %Rrc, trying next one\n", 887 g_aBackends[i].pszName, rc); 888 continue; 889 } 890 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unable to init driver stack: %Rrc\n", rc); 891 } 892 862 893 if (RT_FAILURE(rc)) 863 return RTMsgErrorExit(RTEXITCODE_SYNTAX, " Unable to init driver stack: %Rrc\n", rc);894 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Probing all backends failed, unable to continue\n"); 864 895 865 896 PPDMAUDIOHOSTDEV pDev; -
trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp
r90766 r90776 418 418 } 419 419 420 RTTestFailed(g_hTest, "Failed to construct audio driver '%s': %Rrc", pDrvReg->szName, rc);421 420 if (pDrvReg->pfnDestruct) 422 421 pDrvReg->pfnDestruct(pDrvIns);
Note:
See TracChangeset
for help on using the changeset viewer.