Repository navigation
Audio groups, stage 1: Discord as a stream of its own (server 0.3.37, client 0.1.37) - #93
Merged
Merged
Conversation
Windows tray (0.1.37): "Send Discord on its own (mono)" captures Discord by process (process loopback, Windows 10 2004+: what a process tree plays, on any device, before the device's volume) and sends it as a second VBAN stream, <main>Comms, in mono. Off by default. The menu shows its level and warns when Discord also plays on the captured device or into Voicemeeter, where it would reach the headset twice. The tray tells the hub its groups with audio_groups after each hub message and on change. Hub (0.3.37): peers.yaml keeps group_streams per VBAN peer, and the VBAN receiver gets a rule per group stream, making <name>-comms-incoming-source, which WirePlumber plays on the headset like the main stream. load_peers now skips keys it doesn't know, so a downgrade still starts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 1 of audio groups: Discord can go to the hub as its own stream, so stage 2 can give it its own volume, mute and pan, and stage 4 can record it as its own track.
Windows tray (0.1.37)
Audio/AppCapture.cs: Windows' process loopback (ActivateAudioInterfaceAsynconVAD\Process_Loopback, Windows 10 2004+). NAudio 2.2.1 has the types but no public way in, so it's direct interop.Discord.exewhose parent isn't one) every 2 s and captures that process and its children.<main stream>Comms(SageAudioCommson sage).audio_groups({"comms": "SageAudioComms"}, or{}) after eachhubmessage and whenever the setting changes.Hub (0.3.37)
peers.set_group_streamsstoresgroup_streamsper VBAN peer and validates the names: only known groups, VBAN's 16 bytes, and no clash with any stream.<name>-comms-incoming-source. WirePlumber plays it on the headset like the main stream. The config is rewritten only when the groups change.load_peersskips keys it doesn't know, so an older Bragi still starts on a newer peers.yaml.Checked before writing it, with a prototype on sage:
Tests
audio_groupsover the peer socket, and a peers.yaml with unknown keys.dotnet test145 passed: finding the root process and its tree, mono downmix and peak, stream name length, an older audio.json, and the menu lines.Not yet heard end to end; that needs Discord playing something on sage.
🤖 Generated with Claude Code