Reply To: OpenEars reduces sound playback quality

Home Forums OpenEars OpenEars reduces sound playback quality Reply To: OpenEars reduces sound playback quality

#10976
hohl
Participant

Are you looking for this?
NSError *audioSessionError = nil;
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&audioSessionError];
[[AVAudioSession sharedInstance] setActive:YES error:&audioSessionError];
if (audioSessionError != nil) {
NSLog(@"Something went wrong with initialising the audio session!");
}

AudioSessionSetActive(true);
AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, ARAudioSessionPropertyListener, nil);

AVPlayer is just played and OpenEars session starts when triggered by the user. AVPlayer still plays in background, but I’ll going to make the volume of it lower during OpenEars session in future to provide better results.