Changeset 89835 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jun 22, 2021 1:57:01 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145292
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r89685 r89835 211 211 } 212 212 213 /** @copydoc ATSCALLBACKS::pfnTestSetBegin */ 214 static DECLCALLBACK(int) drvHostValKitTestSetBegin(void const *pvUser, const char *pszTag) 215 { 216 PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser; 217 218 LogRel(("Audio: Validation Kit: Beginning test set '%s'\n", pszTag)); 219 return AudioTestSetCreate(&pThis->Set, pThis->szPathTemp, pszTag); 213 /** 214 * Performs some internal cleanup / housekeeping of all registered tests. 215 * 216 * @param pThis ValKit audio driver instance. 217 */ 218 static void drvHostValKitCleanup(PDRVHOSTVALKITAUDIO pThis) 219 { 220 LogRel(("Audio: Validation Kit: Cleaning up ...\n")); 221 222 if (pThis->cTestsRec) 223 LogRel(("Audio: Validation Kit: Warning: %RU32 guest recording tests still outstanding:\n", pThis->cTestsRec)); 224 225 PVALKITTESTDATA pTst, pTstNext; 226 RTListForEachSafe(&pThis->lstTestsRec, pTst, pTstNext, VALKITTESTDATA, Node) 227 { 228 size_t const cbOutstanding = pTst->t.TestTone.u.Rec.cbToWrite - pTst->t.TestTone.u.Rec.cbWritten; 229 if (cbOutstanding) 230 LogRel(("Audio: Validation Kit: \tRecording test #%RU32 has %RU64 bytes (%RU32ms) outstanding\n", 231 pTst->idxTest, cbOutstanding, PDMAudioPropsBytesToMilli(&pTst->t.TestTone.Parms.Props, cbOutstanding))); 232 drvHostValKiUnregisterRecTest(pThis, pTst); 233 } 234 235 if (pThis->cTestsPlay) 236 LogRel(("Audio: Validation Kit: Warning: %RU32 guest playback tests still outstanding:\n", pThis->cTestsPlay)); 237 238 RTListForEachSafe(&pThis->lstTestsPlay, pTst, pTstNext, VALKITTESTDATA, Node) 239 { 240 size_t const cbOutstanding = pTst->t.TestTone.u.Play.cbToRead - pTst->t.TestTone.u.Play.cbRead; 241 if (cbOutstanding) 242 LogRel(("Audio: Validation Kit: \tPlayback test #%RU32 has %RU64 bytes (%RU32ms) outstanding\n", 243 pTst->idxTest, cbOutstanding, PDMAudioPropsBytesToMilli(&pTst->t.TestTone.Parms.Props, cbOutstanding))); 244 drvHostValKiUnregisterPlayTest(pThis, pTst); 245 } 246 247 Assert(pThis->cTestsRec == 0); 248 Assert(pThis->cTestsPlay == 0); 220 249 } 221 250 … … 225 254 *********************************************************************************************************************************/ 226 255 256 /** @copydoc ATSCALLBACKS::pfnTestSetBegin */ 257 static DECLCALLBACK(int) drvHostValKitTestSetBegin(void const *pvUser, const char *pszTag) 258 { 259 PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser; 260 261 LogRel(("Audio: Validation Kit: Beginning test set '%s'\n", pszTag)); 262 return AudioTestSetCreate(&pThis->Set, pThis->szPathTemp, pszTag); 263 } 264 227 265 /** @copydoc ATSCALLBACKS::pfnTestSetEnd */ 228 266 static DECLCALLBACK(int) drvHostValKitTestSetEnd(void const *pvUser, const char *pszTag) … … 242 280 if (RT_SUCCESS(rc)) 243 281 LogRel(("Audio: Validation Kit: Packed up to '%s'\n", pThis->szTestSetArchive)); 282 283 /* Do some internal housekeeping. */ 284 drvHostValKitCleanup(pThis); 244 285 245 286 int rc2 = AudioTestSetWipe(pSet); … … 869 910 if (RT_SUCCESS(rc)) 870 911 { 871 LogRel(("Audio: Validation Kit: Shutdown of Audio Test Service complete\n")); 872 873 if (pThis->cTestsRec) 874 LogRel(("Audio: Validation Kit: Warning: %RU32 guest recording tests still outstanding:\n", pThis->cTestsRec)); 875 876 PVALKITTESTDATA pTst, pTstNext; 877 RTListForEachSafe(&pThis->lstTestsRec, pTst, pTstNext, VALKITTESTDATA, Node) 878 { 879 size_t const cbOutstanding = pTst->t.TestTone.u.Rec.cbToWrite - pTst->t.TestTone.u.Rec.cbWritten; 880 if (cbOutstanding) 881 LogRel(("Audio: Validation Kit: \tRecording test #%RU32 has %RU64 bytes outstanding\n", pTst->idxTest, cbOutstanding)); 882 drvHostValKiUnregisterRecTest(pThis, pTst); 883 } 884 885 if (pThis->cTestsPlay) 886 LogRel(("Audio: Validation Kit: Warning: %RU32 guest playback tests still outstanding:\n", pThis->cTestsPlay)); 887 888 RTListForEachSafe(&pThis->lstTestsPlay, pTst, pTstNext, VALKITTESTDATA, Node) 889 { 890 size_t const cbOutstanding = pTst->t.TestTone.u.Play.cbToRead - pTst->t.TestTone.u.Play.cbRead; 891 if (cbOutstanding) 892 LogRel(("Audio: Validation Kit: \tPlayback test #%RU32 has %RU64 bytes outstanding\n", pTst->idxTest, cbOutstanding)); 893 drvHostValKiUnregisterPlayTest(pThis, pTst); 894 } 895 896 Assert(pThis->cTestsRec == 0); 897 Assert(pThis->cTestsPlay == 0); 912 LogRel(("Audio: Validation Kit: Shutdown of Audio Test Service (ATS) complete\n")); 913 drvHostValKitCleanup(pThis); 898 914 } 899 915 else 900 LogRel(("Audio: Validation Kit: Shutdown of Audio Test Service failed, rc=%Rrc\n", rc));916 LogRel(("Audio: Validation Kit: Shutdown of Audio Test Service (ATS) failed, rc=%Rrc\n", rc)); 901 917 902 918 /* Try cleaning up a bit. */
Note:
See TracChangeset
for help on using the changeset viewer.