Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
Add AVAudioSession mode prior to starting session
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuongv committed Jun 29, 2015
1 parent 6c895c6 commit c1003f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Private/Manager/Audio/OCTAudioEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ - (BOOL)startAudioSession:(NSError **)error

return ([session setCategory:AVAudioSessionCategoryPlayAndRecord error:error] &&
[session setPreferredSampleRate:kDefaultSampleRate error:error] &&
[session setMode:AVAudioSessionModeVideoChat error:error] &&
[session setActive:YES error:error]);
}

Expand Down
1 change: 1 addition & 0 deletions objcToxTests/OCTAudioEngineTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ - (void)setUp
[OCMStub([self.audioSession setPreferredSampleRate:0 error:[OCMArg anyObjectRef]]).andReturn(YES) ignoringNonObjectArgs];
OCMStub([self.audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:[OCMArg anyObjectRef]]).andReturn(YES);
[OCMStub([self.audioSession setPreferredIOBufferDuration:0 error:[OCMArg anyObjectRef]]).andReturn(YES) ignoringNonObjectArgs];
OCMStub(([self.audioSession setMode:AVAudioSessionModeVideoChat error:[OCMArg anyObjectRef]])).andReturn(YES);
OCMStub([self.audioSession setActive:YES error:[OCMArg anyObjectRef]]).andReturn(YES);
OCMStub([self.audioSession setActive:NO error:[OCMArg anyObjectRef]]).andReturn(YES);

Expand Down

0 comments on commit c1003f4

Please sign in to comment.