Skip to content
Snippets Groups Projects
Commit 38b55ed2 authored by Pierre Nicolas's avatar Pierre Nicolas :joy:
Browse files

call: don't bind audio that are muted

`bindRingbuffers` is bilateral.

GitLab: #1088
Change-Id: I5fdb58c69f870588900eff0b23fde01de1955219
parent 5beb24ba
No related branches found
No related tags found
No related merge requests found
......@@ -1777,7 +1777,11 @@ Conference::bindHostAudio()
}
// Bind audio
if (source.label_ == sip_utils::DEFAULT_AUDIO_STREAMID) {
rbPool.bindRingbuffers(id, RingBufferPool::DEFAULT_ID);
bool isParticipantMuted = isMuted(call->getCallId());
if (isParticipantMuted)
rbPool.bindHalfDuplexOut(id, RingBufferPool::DEFAULT_ID);
else
rbPool.bindRingbuffers(id, RingBufferPool::DEFAULT_ID);
} else {
auto buffer = source.sourceUri_;
static const std::string& sep = libjami::Media::VideoProtocolPrefix::SEPARATOR;
......@@ -1852,10 +1856,10 @@ Conference::bindSubCallAudio(const std::string& callId)
// Bind local participant to other participants only if the
// local is attached to the conference.
if (getState() == State::ACTIVE_ATTACHED) {
if (isMediaSourceMuted(MediaType::MEDIA_AUDIO))
bool isHostMuted = isMuted("host"sv);
if (isMediaSourceMuted(MediaType::MEDIA_AUDIO) or isHostMuted)
rbPool.bindHalfDuplexOut(RingBufferPool::DEFAULT_ID, stream.first);
else
rbPool.bindRingbuffers(stream.first, RingBufferPool::DEFAULT_ID);
else rbPool.bindRingbuffers(stream.first, RingBufferPool::DEFAULT_ID);
rbPool.flush(RingBufferPool::DEFAULT_ID);
}
}
......
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