Repository navigation
pcmflux 2.2.0
A release adding a stereo fold beside a surround capture, the Opus encoder's complexity as a setting, and a silence marker on the audio header, cutting the microphone queue's standing delay, serving the Ogg socket to its user alone, and leaving libxcb to the host in the manylinux wheels.
New Features
- A stereo fold beside a surround capture :
AudioCapture.set_stereo_companion(True)has a surround capture fold every frame to stereo (ITU-R BS.775: the fronts at unity, the center and the surround pairs at -3 dB, the LFE left out, saturating) and encode it with a stereo encoder of its own at the capture's bitrate, delivered right after the surround frame with the same pts andAudioFrame.channels == 2, for a consumer that decodes no multistream Opus (Gecko's WebRTC) AudioCaptureSettings.opus_complexity(0-10, defaultNone) : setsOPUS_SET_COMPLEXITYon the stereo, surround, and stereo-companion encoders when they are created;Nonekeeps libopus's default, and a value outside 0-10 raisesValueErrorbefore a thread is spawned- The silence gate on the audio header : a capture that emits the header sends a bare
[0x01, 0x80](no Opus, stamped with the pts the pause starts at) on the first gated frame after sound and when a session drops, so a player can tell the sender's silence from a late delivery;0x80is never ann_red, andn_red == 0keeps meaning[0x01, 0x00]and Opus. A raw capture (WebRTC) sends nothing new, its RTP timestamps carrying the pause
Resilience & Fixes
- The microphone queue keeps no standing delay : whatever once queued up (a burst after a stalled network or tab, a sink resuming from suspend, a client clock running fast of the sink's) no longer stays as delay for the rest of the session
- The Ogg audio socket serves its user alone : made mode 0600 once bound, a peer that is not this process's user (or root) refused at accept, at most 16 readers at once; a sink path another account owns is left alone and reported, and only a stale socket at the output path is removed
start_capturefails on anoutput_socketthat cannot be bound : raisingRuntimeErrorwith the reason,stateandlast_errorkeeping it, where it returned with the stream served nowhere- The silent frame that ends a sound is sent on a header capture and a raw one alike
- A surround capture opens in the speaker positions its encoder reads
- The manylinux wheels leave libxcb to the host beside libX11 : a bundled libxcb bound the host's libX11 to another layout, which aborted or hung an NVIDIA X.Org capture start in a process that imported pcmflux first
Build & CI
- Each platform's native libraries are built once, then every wheel on them, from the image's own repositories; Rust is installed through rustup-init checked against its SHA-256; rustfmt, clippy, ruff, codespell, actionlint, and shellcheck run in pre-commit and CI; CodeQL analyzes the Python too; the microphone's RED parse is fuzzed under ClusterFuzzLite