chore(repo): remove dead code and useless tests (#3375)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-10 21:43:29 +02:00
1 parent 7e177a1c90
commit 1cd62eb661
1391 files changed
+783 -120415

No files matched your search

@@ -196,7 +196,7 @@ const MAX_DRAIN_FRAMES_PER_TICK = 16;
const MAX_IDLE_DIRECT_CAPTURES = 2;
const MIX_TICK_PERIOD_MS = 20;
let idleDirectCaptures = [];
const idleDirectCaptures = [];
function acquireDirectAudioCapture() {
if (typeof binding.DirectAudioCapture !== 'function') {
@@ -213,10 +213,6 @@ function releaseDirectAudioCapture(capture) {
}
}
function clearIdleDirectCapturePool() {
idleDirectCaptures = [];
}
function patternsEqual(a, b) {
if (a === b) return true;
if (!Array.isArray(a) || !Array.isArray(b)) return false;
@@ -369,10 +365,6 @@ class ProcessLoopback extends EventEmitter {
}
}
routingGraph() {
return this.capture && typeof this.capture.routingGraph === 'function' ? this.capture.routingGraph() : null;
}
setScreenAudioSink(handle) {
if (!this.capture || typeof this.capture.setScreenAudioSink !== 'function') return false;
try {
@@ -416,15 +408,7 @@ class ProcessLoopback extends EventEmitter {
module.exports = {
AudioBridge: binding.AudioBridge,
DirectAudioCapture: binding.DirectAudioCapture,
AudioMixRuntimeHandle: binding.AudioMixRuntimeHandle,
ProcessLoopback,
pipeWireAvailable: binding.pipeWireAvailable,
audioBackend: binding.audioBackend ?? (() => (binding.pipeWireAvailable?.() ? 'pipewire' : 'none')),
__setBindingForTests(nextBinding) {
binding = nextBinding;
clearIdleDirectCapturePool();
},
__getIdleDirectCaptureCountForTests() {
return idleDirectCaptures.length;
},
};