Changeset 92335 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 10, 2021 5:20:27 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r92327 r92335 1096 1096 uint8_t *auBuf = (uint8_t *)pvBuf; 1097 1097 1098 uint64_t const msStartedTS = RTTimeMilliTS(); 1099 1098 1100 while (cbWritten < cbBuf) 1099 1101 { … … 1116 1118 bool const fStarted = AudioTestBeaconGetRemaining(pBeacon) == AudioTestBeaconGetSize(pBeacon); 1117 1119 1118 size_t off = 0; /* Points at the data right *after the found beacon data on return. */1120 size_t off = 0; /* Points at the data right *after* the found beacon data on return. */ 1119 1121 rc2 = AudioTestBeaconAddConsecutive(pBeacon, auBuf, cbBuf - cbWritten, &off); 1120 1122 if (RT_SUCCESS(rc2)) … … 1122 1124 cbWritten += (uint32_t)off; 1123 1125 auBuf += off; 1126 } 1127 else /* No beacon data found. */ 1128 { 1129 LogRel2(("ValKit: Test #%RU32: Warning: Beacon data for '%s' not found (%Rrc) - Skipping ...\n", 1130 pTst->idxTest, AudioTestBeaconTypeGetName(pBeacon->enmType), rc2)); 1131 cbWritten = cbBuf; /* Skip all. */ 1132 break; 1124 1133 } 1125 1134 … … 1151 1160 pTst->idxTest, cbRemaining, PDMAudioPropsBytesToMilli(&pStream->pStream->Cfg.Props, cbRemaining))); 1152 1161 1153 /* Whether we count all silence as recorded data or not. 1154 * Currently we don't, as otherwise consequtively played tones will be cut off in the end. */ 1155 if (!fIsAllSilence) 1156 { 1157 /* Don't read more than we're told to. 1158 * After the actual test tone data there might come a post beacon which also 1159 * needs to be handled in the AUDIOTESTSTATE_POST state then. */ 1160 const uint32_t cbData = RT_MIN(cbBuf - cbWritten, cbRemaining); 1161 1162 pTst->t.TestTone.u.Play.cbRead += cbData; 1163 1164 cbWritten += cbData; 1165 auBuf += cbData; 1166 } 1162 /* Don't read more than we're told to. 1163 * After the actual test tone data there might come a post beacon which also 1164 * needs to be handled in the AUDIOTESTSTATE_POST state then. */ 1165 const uint32_t cbData = RT_MIN(cbBuf - cbWritten, cbRemaining); 1166 1167 pTst->t.TestTone.u.Play.cbRead += cbData; 1168 1169 cbWritten += cbData; 1170 auBuf += cbData; 1167 1171 1168 1172 const bool fComplete = pTst->t.TestTone.u.Play.cbRead >= pTst->t.TestTone.u.Play.cbToRead; … … 1172 1176 pTst->idxTest, RTTimeMilliTS() - pTst->msStartedTS)); 1173 1177 1174 if (pTst->t.TestTone.u.Play.cbRead > pTst->t.TestTone.u.Play.cbToRead)1175 LogRel(("ValKit: Test #%RU32: Warning: Read %RU32 bytes more than announced\n",1176 pTst->idxTest, pTst->t.TestTone.u.Play.cbRead - pTst->t.TestTone.u.Play.cbToRead));1177 1178 1178 pTst->enmState = AUDIOTESTSTATE_POST; 1179 1179 1180 /* Re-use the beacon object, but this time it's the post beacon. */ 1180 1181 AudioTestBeaconInit(&pTst->t.TestTone.Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_POST, &pTst->t.TestTone.Parms.Props); … … 1196 1197 if (pTst->enmState == AUDIOTESTSTATE_DONE) 1197 1198 break; 1199 1200 if (RTTimeMilliTS() - msStartedTS > RT_MS_30SEC) 1201 { 1202 LogRel(("ValKit: Test #%RU32: Error: Playback processing timed out -- please report this bug!\n", pTst->idxTest)); 1203 break; 1204 } 1198 1205 } 1199 1206
Note:
See TracChangeset
for help on using the changeset viewer.