This commit is contained in:
legop3
2026-02-21 17:32:16 -05:00
parent 32ec8e1aa3
commit a76062b873
3 changed files with 17 additions and 11 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" /> <meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
<title>Multi Roomba Rover</title> <title>Multi Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-CtQnuYlS.js"></script> <script type="module" crossorigin src="/assets/index-CaoPznJ4.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Bz1ixYh7.css"> <link rel="stylesheet" crossorigin href="/assets/index-Bz1ixYh7.css">
</head> </head>
<body> <body>
+9 -3
View File
@@ -23,6 +23,7 @@ const COMPRESSOR_SETTINGS = {
attack: 0.002, attack: 0.002,
release: 0.18, release: 0.18,
}; };
const COMPRESSOR_MAKEUP_GAIN = 2.25;
export default function VideoTile({ export default function VideoTile({
sessionInfo, sessionInfo,
@@ -278,8 +279,9 @@ export default function VideoTile({
autoLevelMode === 'compressor' && autoLevelMode === 'compressor' &&
audioGainRef.current audioGainRef.current
) { ) {
audioGainRef.current.gain.value = effectiveRoverGain; const graphGain = Math.max(0, Math.min(4, effectiveRoverGain * COMPRESSOR_MAKEUP_GAIN));
logAudio('context/gain-restored', { gain: effectiveRoverGain }); audioGainRef.current.gain.value = graphGain;
logAudio('context/gain-restored', { gain: graphGain, baseGain: effectiveRoverGain });
} }
logAudio('context/resume-result'); logAudio('context/resume-result');
}, [logAudio, autoLevelEnabled, autoLevelMode, effectiveRoverGain]); }, [logAudio, autoLevelEnabled, autoLevelMode, effectiveRoverGain]);
@@ -480,7 +482,11 @@ export default function VideoTile({
audioEl.volume = 0; audioEl.volume = 0;
logAudio('route/graph', { contextRunning, elementVolume: audioEl.volume }); logAudio('route/graph', { contextRunning, elementVolume: audioEl.volume });
if (gainNode) { if (gainNode) {
gainNode.gain.value = contextRunning ? effectiveRoverGain : 0; const graphGain = contextRunning
? Math.max(0, Math.min(4, effectiveRoverGain * COMPRESSOR_MAKEUP_GAIN))
: 0;
gainNode.gain.value = graphGain;
logAudio('route/graph-gain', { graphGain, baseGain: effectiveRoverGain });
} }
if (compressor) { if (compressor) {
compressor.threshold.value = COMPRESSOR_SETTINGS.threshold; compressor.threshold.value = COMPRESSOR_SETTINGS.threshold;