Fix argument order, sizing, and interleaving bugs in microphone handling

Adapted from commit dd43d476b023acfcaab4bdee942c98fd30d83f50 in
https://github.com/jimrandomh/g2flash/pull/4.

Co-Authored-By: Kalani Helekunihi <i@am.guru>
This commit is contained in:
James BabcockandKalani Helekunihi committed 2026-09-26 11:57:40 -07:00
1 parent 51edaee883
commit e8d2f5ade9
2 files changed
+15 -14

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ import {
isStockAudioPacket,
micChannelKey,
micChannelLabel,
splitConcatenatedPcm16,
splitInterleavedPcm16,
templeActive,
type MicChannelKey,
type MicSide,
@@ -586,7 +586,7 @@ class MicSession {
return;
}
const side: MicSide = arm === "L" ? "left" : "right";
const channels = splitConcatenatedPcm16(frame);
const channels = splitInterleavedPcm16(frame);
if (!channels || channels.length === 0) return;
// Meter every arriving channel — a host-disabled mic still shows its