pzmarzly/mic_over_mumble

Newly opened programs play sound on Loopback_of_Mumble, not default output

vankomerzhic24 opened this issue · 7 comments

screen

The title sums it up pretty much. Only the sound from Mumble should go into the virtual microphone.

Although you can select the right output for each program in pavucontrol, it's tedious work, you can always miss something and whenever an already opened program starts playing something different, it might do so through the wrong output. A good example of this is when you rewind a video on YouTube.

P.S. Thanks a lot for your script! It's the only working approach that I've found so far (tried WoMic, audiojack connection)

Does making another device the default (click the green tick on Output Devices tab in pavucontrol) help?

If not, could you post the output of pactl list sources? It should list priorities, and which I think can be reconfigured (update-sink-proplist etc).

I don't see the tick
screen

terminal output

What I had in mind is the rightmost button. Apparently it has a playback icon on your system (possibly due to Plasma theme). Here's how it looks on Ubuntu 20.10 (GNOME):

Screenshot from 2021-03-12 19-12-32

When I hover over it, it says "Set as fallback". I clicked it a bunch of times, opened a video on YouTube but it still played on the wrong output. Did the same again but still didn't work

pactl list sinks only shows one device's priority:

output

Perhaps we could add a low/lowest priority setting for the sink in the script and make only Mumble play through it? Correct me if I'm wrong, but it seems that the priority isn't set at all since I can neither see it in the code nor when typing those commands

@pzmarzly it seems you can't change a sink's priority with update-sink-proplist because the priority is found in the ports section, not properties. I tried setting it manually with pactl set-default-sink but it didn't work. Tried adding the sink to /etc/pulse/default.pa, restarting PA with pulseaudio -k, setting the default sink again but still no luck.

vanko@MyPC:~$ pacmd list-sinks | grep -e 'name:' -e 'index:'
  * index: 2
        name: <alsa_output.pci-0000_00_14.2.analog-stereo>
vanko@MyPC:~$ pactl load-module \
>         module-null-sink \
>         sink_name=Loopback_of_Mumble \
>         sink_properties=device.description=Loopback_of_Mumble
26
vanko@MyPC:~$ pacmd list-sinks | grep -e 'name:' -e 'index:'
    index: 2
        name: <alsa_output.pci-0000_00_14.2.analog-stereo>
  * index: 3
        name: <Loopback_of_Mumble>
vanko@MyPC:~$ pactl set-default-sink alsa_output.pci-0000_00_14.2.analog-stereo
vanko@MyPC:~$ pacmd list-sinks | grep -e 'name:' -e 'index:'
    index: 2
        name: <alsa_output.pci-0000_00_14.2.analog-stereo>
  * index: 3
        name: <Loopback_of_Mumble>
vanko@MyPC:~$

As you can see, the asterisk shows that the loopback is still the default sink