How marimuthu-07/speakerflow works
SpeakerFlow is an Electron desktop audio manager. Users discover outputs and streams, select or route audio, and can start temporary multi-speaker sessions; the renderer sends controls through Electron IPC to audio services and platform backends. The README also documents wave-pattern and coordinate-based spatial movement. Windows has a separate WASAPI fan-out implementation. Some renderer and backend wiring is documented rather than shown in excerpts, so those links cite the README; unsampled implementation details are not inferred.
Main entry points: main.cjs Electron main · speakerEngineService.cjs Speaker sessions · waveEngineController.cjs Wave controller · createAudioBackend.cjs Backend factory
Components 24
Desktop app
- Renderer UI
src/App.jsx - Preload API
electron/preload.cjs - Electron main
electron/main.cjs
Audio services
- Stream routing
electron/audio/streamRoutingService.cjs - Speaker sessions
electron/audio/speakerEngineService.cjs - Backend factory
electron/audio/createAudioBackend.cjs - PipeWire backend
electron/audio/linuxPipeWireAudioBackend.cjs - PipeWire pipeline
electron/audio/linuxPipeWirePipelineAdapter.cjs - Windows backend
electron/audio/windowsCoreAudioBackend.cjs - WASAPI pipeline
electron/audio/windowsCoreAudioPipelineAdapter.cjs - Device delays
electron/audio/deviceDelayStore.cjs
Motion engines
- Wave controller
electron/audio/waveEngineController.cjs - Wave patterns
electron/audio/wavePatterns.cjs - Spatial audio
electron/audio/spatialAudio.cjs - Motion models
electron/audio/motionEngine.cjs
Native audio
- PipeWire addon
native/pipewire_binding.c - Core Audio binding
native/windows/coreaudio_binding.cpp - WASAPI fan-out
native/windows/wasapi_fanout_engine.h - WASAPI capture
native/windows/wasapi_capture_client.h - WASAPI render
native/windows/wasapi_render_client.h - Format pipeline
native/windows/audio_format_pipeline.h - Drift correction
native/windows/audio_drift_controller.h
Other components
- User
- PipeWire
Connections 24
- User → Renderer UI: controls
README.md - Renderer UI → Preload API: requests
README.md - Preload API → Electron main: invokes IPC
README.md - Electron main → Backend factory: creates backend
electron/main.cjs - Electron main → Stream routing: routes streams
electron/main.cjs - Electron main → Speaker sessions: starts sessions
electron/main.cjs - Backend factory → PipeWire backend: selects platform
electron/audio/createAudioBackend.cjs - Backend factory → Windows backend: selects platform
electron/audio/createAudioBackend.cjs - Speaker sessions → Backend factory: creates pipeline
electron/audio/speakerEngineService.cjs - Speaker sessions → Wave controller: updates branches
electron/audio/speakerEngineService.cjs - Speaker sessions → Device delays: reads delays
electron/audio/speakerEngineService.cjs - PipeWire backend → PipeWire addon: calls addon
README.md - PipeWire addon → PipeWire: uses native API
README.md - PipeWire backend → PipeWire pipeline: provides pipeline
electron/audio/createAudioBackend.cjs - Windows backend → Core Audio binding: loads binding
electron/audio/windowsCoreAudioBackend.cjs - Windows backend → WASAPI pipeline: provides pipeline
electron/audio/createAudioBackend.cjs - Wave controller → Wave patterns: calculates gains
electron/audio/waveEngineController.cjs - Wave controller → Spatial audio: calculates spatial gains
electron/audio/waveEngineController.cjs - Wave controller → Motion models: uses motion models
electron/audio/waveEngineController.cjs - Core Audio binding → WASAPI fan-out: controls engine
- WASAPI fan-out → WASAPI capture: fans out capture
native/windows/wasapi_fanout_engine.h - WASAPI fan-out → WASAPI render: starts branches
native/windows/wasapi_fanout_engine.h - WASAPI render → Format pipeline: processes audio
native/windows/wasapi_render_client.h - WASAPI render → Drift correction: corrects drift
native/windows/wasapi_render_client.h