[fix](trx-frontend): fix audio callback parse error

Rename the duplicate callback-local variable so app.js loads cleanly and dependent plugin scripts can access shared helpers.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-01 11:08:22 +01:00
parent 8ec442da0a
commit c2b287e000
@@ -2909,10 +2909,10 @@ function startRxAudio() {
opusDecoder = new AudioDecoder({
output: (frame) => {
const frameChannels = extractAudioFrameChannels(frame);
const now = Date.now();
if (now - lastLevelUpdate >= 50) {
const levelNow = Date.now();
if (levelNow - lastLevelUpdate >= 50) {
setAudioLevel(levelFromChannels(frameChannels, frame.numberOfFrames));
lastLevelUpdate = now;
lastLevelUpdate = levelNow;
}
const forceMono = frame.numberOfChannels >= 2
&& wfmAudioModeEl