home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 107,567 of 107,822   
   vallor to ldo@nz.invalid   
   Re: pipewire and simultaenous sound outp   
   19 Sep 25 06:09:53   
   
   From: vallor@cultnix.org   
      
   On Fri, 19 Sep 2025 02:03:10 -0000 (UTC), Lawrence D’Oliveiro   
    wrote in <10aidku$7uud$1@dont-email.me>:   
      
   > On Sun, 14 Sep 2025 21:07:46 -0400, bad sector wrote:   
   >   
   >> I have onboard HD-Audio + a Xonar sound card but I cannot get   
   >> simultaneous output to headset and speakes. This used to be possible   
   >> with PulseAudio but that is no longer an option on many distros. The   
   >> mobo is an Asus x870e creator (of headaches & diarrhea).   
   >   
   > This is possible with a PipeWire patching tool like qpwgraph, but I   
   > didn’t know of any control-panel-type function that would set it up   
   > persistently.   
      
   ChatGPT is pretty good at coming up with the systemd unit files to make   
   this work, as well as the commands.   
      
   I use fancy audio routing so chat notification bells and such don't get   
   routed onto a stream.  The trick there is to set up a null sink, route   
   everything you want to stream (or hear) there, then use a loopback to   
   monitor the null sink.   
      
   Two shell scripts for your inspection:   
      
   #!/bin/bash   
      
   # Create a virtual sink (output)   
   pactl load-module module-null-sink \   
     sink_name=virt_out \   
     sink_properties='device.description=Virtual\ Output'   
      
   # See it:   
   pactl list short sinks   
   # You’ll also get a source named:  virt_out.monitor   
   -->% cut here %<--   
      
   Then:   
      
   #!/bin/bash   
   # Get your current default real sink (speakers)   
   SPEAKERS=$(pactl info | awk -F': ' '/Default Sink:/ {print $2}')   
      
   # Loopback the null-sink monitor → speakers   
   pactl load-module module-loopback \   
     source=virt_out.monitor \   
     sink="$SPEAKERS" \   
     latency_msec=10   
   -->% cut here %<--   
      
   Then use pavucontrol to route your audio however you like it.  For   
   your case, you might need another loopback to drive the second set of   
   speakers, so you'd use the second script again with   
   'sink="$OTHER_SPEAKERS"'.   
      
   Note that I'm using pulse-pipewire, and it works here:   
      
   https://imgur.com/a/8MfptB1   
      
    ...album showing three images, including qpwgraph -- where I   
   tried to align the blocks to show how the signal gets to my speakers   
   from vlc.   
      
   Incidentally, this null/loopback interface setup is exactly why   
   I moved all my streaming to Linux.  Pulseaudio (and pipewire)   
   are extremely flexible -- try doing this kind of audio routing   
   with "The Leading Brand". ;)   
      
   --   
   -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090Ti 24G   
      OS: Linux 6.16.7 D: Mint 22.2 DE: Xfce 4.18   
      NVIDIA: 580.82.09 Mem: 258G   
      "Should I weed the lawn or say it's a garden?"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca