From a386867dd0207612abbf444ff80252bb38c02fe9 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Tue, 16 Sep 2025 08:44:38 +0800 Subject: [PATCH] fixed: stream view interrupted by mic stream --- .../ViewControllers/StreamFrameViewController.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/VoidLink/ViewControllers/StreamFrameViewController.m b/VoidLink/ViewControllers/StreamFrameViewController.m index 74e8465f..c287e5d0 100644 --- a/VoidLink/ViewControllers/StreamFrameViewController.m +++ b/VoidLink/ViewControllers/StreamFrameViewController.m @@ -1275,14 +1275,14 @@ - (void) stageComplete:(const char*)stageName { _micStreamInitialized = false; if(strcmp(stageName, "mic stream establishment")==0){ - - if(_streamConfig.redirectMic){ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - self->_micStreamInitialized = true; - self->micHandler = [MicHandler new]; - [self->micHandler startTapping]; - }); - } + dispatch_time_t delay = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)); + dispatch_after(delay, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + if(self->_streamConfig.redirectMic){ + self->_micStreamInitialized = true; + self->micHandler = [MicHandler new]; + [self->micHandler startTapping]; + } + }); } if(strcmp(stageName, "mic stream unsupported or unintialized")==0){