Skip to content

Commit

Permalink
FIX(client): Prevent local muted users from triggering attenuation
Browse files Browse the repository at this point in the history
When 'while others users talk' attenuation is enabled, unmuted users
still trigger attenuation even if they are locally muted.

The fix is don't add local muted users' audio source to the mixing
for the audio output

Fixes #6247
  • Loading branch information
jlallas384 committed Apr 17, 2024
1 parent fd0a73a commit bad660f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/mumble/AudioOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,19 @@ bool AudioOutput::mix(void *outbuff, unsigned int frameCount) {
// Get the users that are currently talking (and are thus serving as an audio source)
QMultiHash< const ClientUser *, AudioOutputBuffer * >::const_iterator it = qmOutputs.constBegin();
while (it != qmOutputs.constEnd()) {
const ClientUser *user = it.key();
AudioOutputBuffer *buffer = it.value();

if (!buffer->prepareSampleBuffer(frameCount)) {
qlDel.append(buffer);
} else {
} else if (!user) {
qlMix.append(buffer);
} else {
if (!user->bLocalMute) {
qlMix.append(buffer);
}

const ClientUser *user = it.key();
if (user && user->bPrioritySpeaker) {
if (user->bPrioritySpeaker) {
prioritySpeakerActive = true;
}
}
Expand Down

0 comments on commit bad660f

Please sign in to comment.