From fcc7efe6d537b82e46e54f2da054db701a52b4cb Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Thu, 18 Jul 2024 15:35:40 +0700 Subject: [PATCH] Fix[output]: low audio volume after fixing microphone --- Natives/SurfaceViewController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Natives/SurfaceViewController.m b/Natives/SurfaceViewController.m index 0bfc7a2f34..41629919b3 100644 --- a/Natives/SurfaceViewController.m +++ b/Natives/SurfaceViewController.m @@ -302,8 +302,10 @@ - (void)updateAudioSettings { } else { options = AVAudioSessionCategoryOptionMixWithOthers; } - [AVAudioSession.sharedInstance setCategory:category withOptions:options error:&sessionError]; - [AVAudioSession.sharedInstance setActive:YES error:&sessionError]; + AVAudioSession *session = AVAudioSession.sharedInstance; + [session setCategory:category withOptions:options error:&sessionError]; + [session setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error: nil]; + [session setActive:YES error:&sessionError]; } - (void)updateJetsamControl {