Changeset 91136 in vbox
- Timestamp:
- Sep 7, 2021 8:03:55 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r91119 r91136 63 63 * Internal Functions * 64 64 *********************************************************************************************************************************/ 65 static int audioVerifyOne(const char *pszPathSetA, const char *pszPathSetB );65 static int audioVerifyOne(const char *pszPathSetA, const char *pszPathSetB, PAUDIOTESTVERIFYOPTS pOpts); 66 66 67 67 … … 146 146 enum 147 147 { 148 VKAT_VERIFY_OPT_TAG = 900 148 VKAT_VERIFY_OPT_MAX_DIFF_COUNT = 900, 149 VKAT_VERIFY_OPT_MAX_DIFF_PERCENT, 150 VKAT_VERIFY_OPT_MAX_SIZE_PERCENT 149 151 }; 150 152 … … 201 203 static const RTGETOPTDEF g_aCmdVerifyOptions[] = 202 204 { 203 { "--tag", VKAT_VERIFY_OPT_TAG, RTGETOPT_REQ_STRING } 205 { "--max-diff-count", VKAT_VERIFY_OPT_MAX_DIFF_COUNT, RTGETOPT_REQ_UINT32 }, 206 { "--max-diff-percent", VKAT_VERIFY_OPT_MAX_DIFF_PERCENT, RTGETOPT_REQ_UINT8 }, 207 { "--max-size-percent", VKAT_VERIFY_OPT_MAX_SIZE_PERCENT, RTGETOPT_REQ_UINT8 } 204 208 }; 205 209 … … 665 669 && !pTstEnv->fSkipVerify) 666 670 { 667 rc = audioVerifyOne(pTstEnv->u.Host.szPathTestSetGuest, pTstEnv->u.Host.szPathTestSetValKit );671 rc = audioVerifyOne(pTstEnv->u.Host.szPathTestSetGuest, pTstEnv->u.Host.szPathTestSetValKit, NULL /* pOpts */); 668 672 } 669 673 else … … 1038 1042 * @param pszPathSetA Absolute path to test set A. 1039 1043 * @param pszPathSetB Absolute path to test set B. 1040 */ 1041 static int audioVerifyOne(const char *pszPathSetA, const char *pszPathSetB) 1044 * @param pOpts Verification options to use. Optional. 1045 * When NULL, the (very strict) defaults will be used. 1046 */ 1047 static int audioVerifyOne(const char *pszPathSetA, const char *pszPathSetB, PAUDIOTESTVERIFYOPTS pOpts) 1042 1048 { 1043 1049 RTTestSubF(g_hTest, "Verifying"); … … 1052 1058 { 1053 1059 AUDIOTESTERRORDESC errDesc; 1054 rc = AudioTestSetVerify(&SetA, &SetB, &errDesc); 1060 if (pOpts) 1061 rc = AudioTestSetVerifyEx(&SetA, &SetB, pOpts, &errDesc); 1062 else 1063 rc = AudioTestSetVerify(&SetA, &SetB, &errDesc); 1055 1064 if (RT_SUCCESS(rc)) 1056 1065 { … … 1113 1122 unsigned iTestSet = 0; 1114 1123 1124 AUDIOTESTVERIFYOPTS Opts; 1125 AudioTestSetVerifyOptsInitStrict(&Opts); 1126 1115 1127 int ch; 1116 1128 RTGETOPTUNION ValueUnion; … … 1119 1131 switch (ch) 1120 1132 { 1121 case VKAT_VERIFY_OPT_TAG: 1133 case VKAT_VERIFY_OPT_MAX_DIFF_COUNT: 1134 Opts.cMaxDiff = ValueUnion.u32; 1135 break; 1136 1137 case VKAT_VERIFY_OPT_MAX_DIFF_PERCENT: 1138 Opts.uMaxDiffPercent = ValueUnion.u8; 1139 break; 1140 1141 case VKAT_VERIFY_OPT_MAX_SIZE_PERCENT: 1142 Opts.uMaxSizePercent = ValueUnion.u8; 1122 1143 break; 1123 1144 … … 1157 1178 1158 1179 if (RT_SUCCESS(rc)) 1159 audioVerifyOne(apszSets[0], apszSets[1] );1180 audioVerifyOne(apszSets[0], apszSets[1], &Opts); 1160 1181 1161 1182 /*
Note:
See TracChangeset
for help on using the changeset viewer.