iOS Question AudioSession after using AudioRecorder

narek adonts

Well-Known Member
Licensed User
Longtime User

narek adonts

Well-Known Member
Licensed User
Longtime User
I am using

B4X:
#import <AVFoundation/AVFoundation.h>
#import <AudioToolbox/AudioToolbox.h>
- (void)setAudioSession {
   AVAudioSession *audioSession = [AVAudioSession sharedInstance];
   NSError *err = nil;
   BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&err];
   if (success) {
     success = [audioSession setActive:YES error:&err];
   }
   if (!success)
     [NSException raise:@"" format:@"Error setting audio session: %@", err];
}

but I resolved the issue with setting the audio session after each time I am using AudioRecorder.
So I think the problem is that the AudioRecorder change the audio session each time.
 
Upvote 0
Top