[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:
@@ -2909,10 +2909,10 @@ function startRxAudio() {
|
|||||||
opusDecoder = new AudioDecoder({
|
opusDecoder = new AudioDecoder({
|
||||||
output: (frame) => {
|
output: (frame) => {
|
||||||
const frameChannels = extractAudioFrameChannels(frame);
|
const frameChannels = extractAudioFrameChannels(frame);
|
||||||
const now = Date.now();
|
const levelNow = Date.now();
|
||||||
if (now - lastLevelUpdate >= 50) {
|
if (levelNow - lastLevelUpdate >= 50) {
|
||||||
setAudioLevel(levelFromChannels(frameChannels, frame.numberOfFrames));
|
setAudioLevel(levelFromChannels(frameChannels, frame.numberOfFrames));
|
||||||
lastLevelUpdate = now;
|
lastLevelUpdate = levelNow;
|
||||||
}
|
}
|
||||||
const forceMono = frame.numberOfChannels >= 2
|
const forceMono = frame.numberOfChannels >= 2
|
||||||
&& wfmAudioModeEl
|
&& wfmAudioModeEl
|
||||||
|
|||||||
Reference in New Issue
Block a user