new AudioWorkletNode(ctx, name, { channelCount: 1, ... }) leaves channelCountMode at its default "max", under which channelCount is ignored and the node's computed input channel count follows the upstream node. If getUserMedia returns a stereo mic (EC's audioCaptureDefaults do not pin channelCount), the worklet receives 2 channels while its processorOptions.maxChannels is 1, so the second channel is dropped or left unprocessed depending on the sapphi worklet's behaviour. The same mismatch applies to the dry path (source.connect(dryGain) at line 309), where the raw stereo signal is summed with a mono wet signal at the destination.
How to trigger
Use a stereo-capable input device (many USB interfaces and virtual cables) with lotusModel=rnnoise.
Suggested fix
Set channelCountMode: "explicit" and channelInterpretation: "speakers" on the worklet node (and on the gains), or downmix explicitly with a ChannelMergerNode/GainNode before the worklet.
Filed from the September 2026 audit (branch lotus).
**Severity:** low · **Type:** bug · **Confidence:** medium
**Location:** `src/lotus/lotusDenoiseProcessor.ts:376-381`
### Problem
`new AudioWorkletNode(ctx, name, { channelCount: 1, ... })` leaves `channelCountMode` at its default `"max"`, under which `channelCount` is ignored and the node's computed input channel count follows the upstream node. If `getUserMedia` returns a stereo mic (EC's `audioCaptureDefaults` do not pin `channelCount`), the worklet receives 2 channels while its `processorOptions.maxChannels` is `1`, so the second channel is dropped or left unprocessed depending on the sapphi worklet's behaviour. The same mismatch applies to the dry path (`source.connect(dryGain)` at line 309), where the raw stereo signal is summed with a mono wet signal at the destination.
### How to trigger
Use a stereo-capable input device (many USB interfaces and virtual cables) with `lotusModel=rnnoise`.
### Suggested fix
Set `channelCountMode: "explicit"` and `channelInterpretation: "speakers"` on the worklet node (and on the gains), or downmix explicitly with a `ChannelMergerNode`/`GainNode` before the worklet.
---
_Filed from the September 2026 audit (branch `lotus`)._
jared
added this to the EC fork audit 2026-09 · Medium & Low milestone 2026-09-12 02:13:10 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: low · Type: bug · Confidence: medium
Location:
src/lotus/lotusDenoiseProcessor.ts:376-381Problem
new AudioWorkletNode(ctx, name, { channelCount: 1, ... })leaveschannelCountModeat its default"max", under whichchannelCountis ignored and the node's computed input channel count follows the upstream node. IfgetUserMediareturns a stereo mic (EC'saudioCaptureDefaultsdo not pinchannelCount), the worklet receives 2 channels while itsprocessorOptions.maxChannelsis1, so the second channel is dropped or left unprocessed depending on the sapphi worklet's behaviour. The same mismatch applies to the dry path (source.connect(dryGain)at line 309), where the raw stereo signal is summed with a mono wet signal at the destination.How to trigger
Use a stereo-capable input device (many USB interfaces and virtual cables) with
lotusModel=rnnoise.Suggested fix
Set
channelCountMode: "explicit"andchannelInterpretation: "speakers"on the worklet node (and on the gains), or downmix explicitly with aChannelMergerNode/GainNodebefore the worklet.Filed from the September 2026 audit (branch
lotus).