Skip to content

Commit

Permalink
ios: set audio category before activating audio
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Jan 1, 2017
1 parent d6894d4 commit 7b60037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/am_backend_ios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ static void ios_init_audio() {
const AudioUnitElement bus = output_bus;
const AudioUnitScope scope = kAudioUnitScope_Input;

set_audio_category();
if (![[AVAudioSession sharedInstance] setActive:YES error:nil]) {
am_log0("%s", "WARNING: unable to activate AVAudioSession");
return;
}
set_audio_category();

memset(&desc, 0, sizeof(AudioComponentDescription));
desc.componentType = kAudioUnitType_Output;
Expand Down

0 comments on commit 7b60037

Please sign in to comment.