Skip to content
Snippets Groups Projects
Commit e04ec346 authored by Mohamed Chibani's avatar Mohamed Chibani Committed by Sébastien Blin
Browse files

AudioInput: apply mute/un-mute state when creating a new instance

In AudioRtpSession, when a new AudioInput instance is created, its mute state
is always set to default (un-muted) even if the AudioRtpSession is in mute
state.
Fixed by applying the mute state when a new AudioInput instance is created.

Gitlab: #482

Change-Id: I3f7e92cfcfd63bc5c6318f317e7fa96fe5f17a7c
parent af6ac9b7
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ AudioRtpSession::startSender()
// sender sets up input correctly, we just keep a reference in case startSender is called
audioInput_ = jami::getAudioInput(callID_);
audioInput_->setMuted(muteState_);
audioInput_->setSuccessfulSetupCb(onSuccessfulSetup_);
auto newParams = audioInput_->switchInput(input_);
try {
......@@ -105,8 +106,8 @@ AudioRtpSession::startSender()
try {
sender_.reset();
socketPair_->stopSendOp(false);
sender_.reset(new AudioSender(
callID_, getRemoteRtpUri(), send_, *socketPair_, initSeqVal_, mtu_));
sender_.reset(
new AudioSender(callID_, getRemoteRtpUri(), send_, *socketPair_, initSeqVal_, mtu_));
} catch (const MediaEncoderException& e) {
JAMI_ERR("%s", e.what());
send_.enabled = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment