• amanwithausername@vlemmy.netOP
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    since they still haven’t fixed the lack of audio on Linux

    Huh, never heard of this. Do you mean that it’s impossible to stream desktop audio through discord? As a workaround, you can try switching to Pipewire and patching your audio output’s monitor into Discord through helvum. Or write a script that does that automatically.

    • kbity@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Yeah, when you stream your desktop from Linux over Discord, your desktop’s audio doesn’t come through. It’s been a known issue for years but it’s a very low priority fix for Discord’s developers.

      Does the method you’re describing play well with speaking at the same time, or do you have to decide whether you want speech or audio?

      • amanwithausername@vlemmy.netOP
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Does the method you’re describing play well with speaking at the same time

        Yes.
        With pipewire, it is possible to patch two sources (i.e. your microphone and an application’s audio) into a single input, and it will mix them together into one stream. I just tested this with Audacity (didn’t feel like booting up Discord, but it should work the same). I could hear my voice and the application’s audio at the same time. This is what it looked like for me in Helvum:

        The gray PortAudio block is Audacity (would be Discord in your case). “ALC3232 Analog” is my microphone (on the left) and my headphones (on the right). Music Player Daemon is the application whose audio I wanted to stream. The connection between the microphone and Audacity was made automatically as soon as I started the recording. I had to manually make the connections from Music Player Daemon to Audacity for both left and right channels. After that I could see both the mic sound and the music player daemon sound in the recording, mixed into one stream. It should work the same way with Discord. If you wanted to, for example, make your voice louder or quiter compared to the application audio, you could just adjust your mic’s gain (or the application’s volume) with Pavucontrol (it’s an app made for Pulseaudio, but it works flawlessly under pipewire as well).

        In my original comment, I said that you could patch your output’s monitor back into Discord. This is a bad idea, since if anyone speaks to you in the call, that audio will also be echoed back to them. So it’s better to connect the individual applications’ audio into Discord as opposed to the output monitor.

        Now, this could get a little tedious, making those connections by hand every time you want to screen share. So you could try to make a script that does something like that automatically. Pipewire also has the concept of a “session manager”, which is basically a daemon that decides which connections are made by default, when new sources or sinks register with Pipewire. For example, wireplumber, the default session manager, was responsible for connection audacity to my microphone automatically. Maybe you could try to configure your session manager to also automatically make connection between Discord and any app that outputs audio (idk tho, never done it before).

        • kbity@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Huh, this is all very informative. Thanks for the breakdown. I’ll have to see if I can get Pipewire going on my gaming setup.

          • eltimablo@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            There’s also discord-screenaudio on Flathub if you don’t feel like doing the work yourself. It works out of the box for me.

            • kbity@kbin.social
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              Oh, that’s good to know. I just hope it isn’t a ban risk. Well, worst case scenario, I can use my alternate account for video streaming, since i have one for using unofficial clients.