DiscRec
Records Discord’s audio. Open it, press record, get one file. The Windows release is under 1 MB.
Find Discord, mix two clocks, write one Ogg. Replayed from the documented pipeline.
Everything except the capture backend is shared. The Mac contributor writes one file against an existing trait.
pub struct Frame {
pub source: Source, // Discord | mic
pub sample_pos: u64, // this stream's clock
pub samples: Vec<f32>,
}
pub trait CaptureBackend: Send {
fn start(&mut self, discord_pid: u32,
sink: FrameSink) -> Result<()>;
fn stop(&mut self) -> Result<()>;
}
WASAPI process loopback on Windows, a Core Audio process tap on macOS. If anything else needs a cfg, that is a design smell.
The hard part is two clocks
Discord’s output and the microphone arrive as independently clocked streams. Drift compensation happens in the mixer, before summing, using each stream’s own sample position rather than wall-clock arrival.
A limiter sits after the sum, because two sources added together clip. Pages of Opus in Ogg are committed as they are made, so a crash still leaves a playable file.
What it deliberately does not do
Auto-start, per-person tracks, video, transcription, cloud, mobile. Each was considered and cut. First launch reminds you that everyone in the call is being recorded — Discord’s Terms require you to tell them; the app cannot say it for you.
Status, honestly
The Windows app works; download the exe from Releases. macOS is in the tree — clone and run the script on 14.2+ — not a packaged download.
Two measurements are still outstanding, not missing features: a four-hour drift soak, and release CPU against a 3% budget.
DiscRec
Guess the anime from its opening. 2–8 players, 20-second clips, no accounts — running entirely on free tiers.
continue