Skip to content

Commit

Permalink
fix: Don't drop audio when routeLoudestOnly is disabled in config.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Sep 27, 2023
1 parent f5f3991 commit a943078
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jvb/src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ public long getLocalVideoSsrc()

@NotNull private final EncodingsManager encodingsManager = new EncodingsManager();

/**
* Cache here because it's accessed on every packet.
*/
private final boolean routeLoudestOnly = LoudestConfig.getRouteLoudestOnly();

/**
* The task of updating the ordered list of endpoints in the conference. It runs periodically in order to adapt to
* endpoints stopping or starting to their video streams (which affects the order).
Expand Down Expand Up @@ -1283,7 +1288,7 @@ else if (pph.wants(packetInfo))
public boolean levelChanged(@NotNull AbstractEndpoint endpoint, long level)
{
SpeakerRanking ranking = speechActivity.levelChanged(endpoint, level);
if (ranking == null)
if (ranking == null || !routeLoudestOnly)
return false;
if (ranking.isDominant && LoudestConfig.Companion.getAlwaysRouteDominant())
return false;
Expand Down

0 comments on commit a943078

Please sign in to comment.