record: keep a track per audio source and let the review mute them

The recorder put every source on one mixer track, so the file had one audio
stream and the review screen could not tell the game's sound from the
microphone or from Discord.

The daemon now gives each source a track: 1 for the game, 2 for the
microphone, then one per application in the settings, up to OBS's six. Every
track above the first gets an audio encoder and the output is told which
tracks to write, which is what libobs's muxer reads to lay the streams out in
track order. The timeline's new `audio_tracks` names what each stream holds,
with empty names for the tracks no source fed.

The app opens one player per stream, copied out of the clip into the audio
cache, and the transport carries a toggle per channel. A channel that is off
is neither heard nor kept: clip and highlight exports mix only the tracks
left on. Recordings made before this change have one stream and play as they
did.
This commit is contained in:
vhaudiquet committed 2026-11-19 18:37:20 +01:00
1 parent 4f2ee4256a
commit eabc3780c9
13 files changed
+545 -46

No files matched your search

+12
View File
@@ -50,6 +50,18 @@ record-daemon/
│ └── error.rs # Error types
```
### Audio tracks
Each source records to a mixer track of its own, and the file keeps them as separate streams:
track 1 is the game's sound, track 2 the microphone, then one track per application in the
settings, up to OBS's six. The stream order is the track order. A recording made when a track
had no source carries a silent stream for it, and the timeline's `audio_tracks` names what each
stream holds, empty for those gaps.
The app plays one audio player per track, so the review screen can mute any of them, and a
clip or highlight export mixes only the tracks left on.
## Platform Support
| Feature | Linux | Windows |