Skip to content

Commit

Permalink
Add support for pause for iOS audioUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
System Administrator authored and System Administrator committed Aug 5, 2016
1 parent 4b366e0 commit 85e2cea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions common-ngn-stack/sip/NgnAVSession.mm
Expand Up @@ -380,6 +380,20 @@ -(BOOL) toggleHoldResume{
return [self toggleHoldResumeWithConfig:nil];
}

// Overrided method
-(void) setLocalHold:(BOOL)held {
const MediaSessionMgr* _mediaMgr = [super getMediaSessionMgr];
if(_mediaMgr){
if (const_cast<MediaSessionMgr*>(_mediaMgr)->producerSetInt32(twrap_media_audio, "hold", held ? 1 : 0) && const_cast<MediaSessionMgr*>(_mediaMgr)->consumerSetInt32(twrap_media_audio, "hold", held ? 1 : 0)) {
TSK_DEBUG_INFO("Putting call on hold succeeded. Held=%s", held ? "YES" : "NO");
}
}
else {
TSK_DEBUG_ERROR("Session hold: no media session associated");
}
[super setLocalHold:held];
}

-(void) setState: (InviteState_t)newState{
if(mState == newState){
return;
Expand Down
1 change: 1 addition & 0 deletions ios-idoubs/UI/AudioCallViewController.mm
Expand Up @@ -427,6 +427,7 @@ - (IBAction) onButtonClick: (id)sender{
else if(sender == buttonMute){
if([audioSession setMute:![audioSession isMuted]]){
self.buttonMute.selected = [audioSession isMuted];
//[audioSession toggleHoldResume];
//[AudioCallViewController applyGradienWithColors: [audioSession isMuted] ? kColorsBlue : nil
// forView:self.buttonMute withBorder:NO];
}
Expand Down

0 comments on commit 85e2cea

Please sign in to comment.