Changeset 91842 in vbox for trunk/src/VBox/ValidationKit/utils
- Timestamp:
- Oct 19, 2021 2:44:02 PM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdGeneric.cpp
r91632 r91842 385 385 } 386 386 audioTestDriverStackStreamDestroy(&DrvStack, pStream); 387 pStream = NULL; 387 388 } 388 389 else … … 494 495 } 495 496 audioTestDriverStackStreamDestroy(&DrvStack, TstStream.pStream); 497 TstStream.pStream = NULL; 496 498 } 497 499 else … … 889 891 } 890 892 audioTestDriverStackStreamDestroy(&DrvStack, pStream); 893 pStream = NULL; 891 894 } 892 895 else -
trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp
r91824 r91842 885 885 /** 886 886 * Destroys a stream. 887 * 888 * @param pDrvStack Driver stack the stream to destroy is assigned to. 889 * @param pStream Stream to destroy. Pointer will be NULL (invalid) after successful return. 887 890 */ 888 891 void audioTestDriverStackStreamDestroy(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream) 889 892 { 890 if (pStream) 891 { 892 if (pDrvStack->pIAudioConnector) 893 { 894 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' (IAudioConnector) ...\n", pStream->Cfg.szName); 895 int rc = pDrvStack->pIAudioConnector->pfnStreamDestroy(pDrvStack->pIAudioConnector, pStream, true /*fImmediate*/); 896 if (RT_FAILURE(rc)) 897 RTTestFailed(g_hTest, "pfnStreamDestroy failed: %Rrc", rc); 893 if (!pStream) 894 return; 895 896 if (pDrvStack->pIAudioConnector) 897 { 898 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' (IAudioConnector) ...\n", pStream->Cfg.szName); 899 int rc = pDrvStack->pIAudioConnector->pfnStreamDestroy(pDrvStack->pIAudioConnector, pStream, true /*fImmediate*/); 900 if (RT_FAILURE(rc)) 901 RTTestFailed(g_hTest, "pfnStreamDestroy failed: %Rrc", rc); 902 } 903 else 904 { 905 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' (IHostAudio) ...\n", pStream->Cfg.szName); 906 PAUDIOTESTDRVSTACKSTREAM pStreamAt = (PAUDIOTESTDRVSTACKSTREAM)pStream; 907 int rc = pDrvStack->pIHostAudio->pfnStreamDestroy(pDrvStack->pIHostAudio, &pStreamAt->Backend, true /*fImmediate*/); 908 if (RT_SUCCESS(rc)) 909 { 910 pStreamAt->Core.uMagic = ~PDMAUDIOSTREAM_MAGIC; 911 pStreamAt->Backend.uMagic = ~PDMAUDIOBACKENDSTREAM_MAGIC; 912 913 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' done\n", pStream->Cfg.szName); 914 915 RTMemFree(pStreamAt); 916 917 pStreamAt = NULL; 918 pStream = NULL; 898 919 } 899 920 else 900 { 901 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' (IHostAudio) ...\n", pStream->Cfg.szName); 902 PAUDIOTESTDRVSTACKSTREAM pStreamAt = (PAUDIOTESTDRVSTACKSTREAM)pStream; 903 int rc = pDrvStack->pIHostAudio->pfnStreamDestroy(pDrvStack->pIHostAudio, &pStreamAt->Backend, true /*fImmediate*/); 904 if (RT_SUCCESS(rc)) 905 { 906 pStreamAt->Core.uMagic = ~PDMAUDIOSTREAM_MAGIC; 907 pStreamAt->Backend.uMagic = ~PDMAUDIOBACKENDSTREAM_MAGIC; 908 RTMemFree(pStreamAt); 909 } 910 else 911 RTTestFailed(g_hTest, "PDMIHOSTAUDIO::pfnStreamDestroy failed: %Rrc", rc); 912 } 913 914 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Destroying stream '%s' done\n", pStream->Cfg.szName); 921 RTTestFailed(g_hTest, "PDMIHOSTAUDIO::pfnStreamDestroy failed: %Rrc", rc); 915 922 } 916 923 }
Note:
See TracChangeset
for help on using the changeset viewer.