Consolidate PltCloseThread() and PltJoinThread()

This commit is contained in:
Cameron Gutman committed 2024-02-17 18:14:03 -06:00
1 parent 9545dd7603
commit 9686f6942f
6 files changed
+7 -64

No files matched your search

-7
View File
@@ -128,7 +128,6 @@ void destroyAudioStream(void) {
if (pingThreadStarted) {
PltInterruptThread(&udpPingThread);
PltJoinThread(&udpPingThread);
PltCloseThread(&udpPingThread);
}
closeSocket(rtpSocket);
@@ -416,11 +415,6 @@ void stopAudioStream(void) {
PltJoinThread(&decoderThread);
}
PltCloseThread(&receiveThread);
if ((AudioCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
PltCloseThread(&decoderThread);
}
AudioCallbacks.cleanup();
}
@@ -463,7 +457,6 @@ int startAudioStream(void* audioContext, int arFlags) {
AudioCallbacks.stop();
PltInterruptThread(&receiveThread);
PltJoinThread(&receiveThread);
PltCloseThread(&receiveThread);
closeSocket(rtpSocket);
AudioCallbacks.cleanup();
return err;