Changeset 91209 in vbox
- Timestamp:
- Sep 10, 2021 4:39:07 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r91208 r91209 732 732 static DECLCALLBACK(int) drvHostValKitAudioHA_StreamDrain(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream) 733 733 { 734 RT_NOREF(pStream); 735 736 PDRVHOSTVALKITAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVHOSTVALKITAUDIO, IHostAudio); 737 738 int rc = RTCritSectEnter(&pThis->CritSect); 739 if (RT_SUCCESS(rc)) 740 { 741 PVALKITTESTDATA pTst = pThis->pTestCurPlay; 742 743 if (pTst) 744 { 745 LogRel(("ValKit: Test #%RU32: Recording audio data ended (took %RU32ms)\n", 746 pTst->idxTest, RTTimeMilliTS() - pTst->msStartedTS)); 747 748 if (pTst->t.TestTone.u.Play.cbRead > pTst->t.TestTone.u.Play.cbToRead) 749 LogRel(("ValKit: Warning: Test #%RU32 read %RU32 bytes more than announced\n", 750 pTst->idxTest, pTst->t.TestTone.u.Play.cbRead - pTst->t.TestTone.u.Play.cbToRead)); 751 752 AudioTestSetTestDone(pTst->pEntry); 753 754 pThis->pTestCurPlay = NULL; 755 pTst = NULL; 756 757 if (ASMAtomicReadBool(&pThis->fTestSetEnd)) 758 rc = RTSemEventSignal(pThis->EventSemEnded); 759 } 760 761 int rc2 = RTCritSectLeave(&pThis->CritSect); 762 AssertRC(rc2); 763 } 764 734 RT_NOREF(pInterface, pStream); 765 735 return VINF_SUCCESS; 766 736 } … … 888 858 PVALKITTESTDATA pTst = NULL; 889 859 890 pThis->cbPlayedTotal += cbBuf; /* Do a bit of accounting. */891 892 860 bool const fIsSilence = PDMAudioPropsIsBufferSilence(&pStream->pStream->Cfg.Props, pvBuf, cbBuf); 861 862 LogRel2(("ValKit: Playing stream '%s' ...\n", pStream->pStream->Cfg.szName)); 893 863 894 864 int rc = RTCritSectEnter(&pThis->CritSect); 895 865 if (RT_SUCCESS(rc)) 896 866 { 867 pThis->cbPlayedTotal += cbBuf; /* Do a bit of accounting. */ 868 897 869 if (pThis->pTestCurPlay == NULL) 898 870 { … … 1040 1012 PVALKITTESTDATA pTst = NULL; 1041 1013 1042 pThis->cbRecordedTotal += cbBuf; /* Do a bit of accounting. */1014 LogRel2(("ValKit: Capturing stream '%s' ...\n", pStream->pStream->Cfg.szName)); 1043 1015 1044 1016 int rc = RTCritSectEnter(&pThis->CritSect); 1045 1017 if (RT_SUCCESS(rc)) 1046 1018 { 1019 pThis->cbRecordedTotal += cbBuf; /* Do a bit of accounting. */ 1020 1047 1021 if (pThis->pTestCurRec == NULL) 1048 1022 { … … 1203 1177 1204 1178 pThis->cTestsTotal = 0; 1205 pThis->cTestsPlay = 0;1206 pThis->cTestsRec = 0;1207 1179 pThis->fTestSetEnd = false; 1208 1180
Note:
See TracChangeset
for help on using the changeset viewer.