Fix: TRAX meter reflection — remove double attenuation from slider+loopback

This commit is contained in:
2026-08-21 08:32:20 -07:00
parent 75ee6978d3
commit e06bfa42a8
4 changed files with 16 additions and 12 deletions
+4 -2
View File
@@ -28,6 +28,8 @@ public sealed class AudioGainProvider
/// <summary>Mic gain for the live mix (0 = muted).</summary>
public double MicGain() => _micMuted() ? 0 : _micVolume();
/// <summary>Loopback (desktop/game) gain for the live mix (0 = muted).</summary>
public double LoopbackGain() => _gameMuted() ? 0 : _gameVolume();
/// <summary>Loopback (desktop/game) gain for the live mix (0 = muted, 1 = unity).
/// Unity because the slider now drives system volume via PushSystemVolume,
/// so the WASAPI loopback signal is already scaled by the user's volume choice.</summary>
public double LoopbackGain() => _gameMuted() ? 0 : 1.0;
}
+2 -2
View File
@@ -10,8 +10,8 @@ namespace ytLive.Services.Audio;
/// through the voice chain (bass → treble → noise gate → compressor), THEN
/// level-metered and queued; loopback samples are resampled to 48 kHz stereo
/// and queued. While live (<see cref="StartLive"/>), a 10 ms loop drains both
/// queues, applies the honest gains (mic = MicVolume, loopback = GameAudioVolume
/// × auto-duck when the mic is hot), mixes them to stereo float, runs the
/// queues, applies the honest gains (mic = MicVolume, loopback = unity
/// × auto-duck when the mic is hot — the slider drives system volume via mixes them to stereo float, runs the
/// master limiter (a -1 dBFS ceiling so the sum never clips the encoder), and
/// writes the chunk to the encoder's audio pipe.
/// </summary>