Score:1

Redirect virtual sink audio to hedphones

do flag

I created null sink via this command

pactl load-module module-null-sink sink_name=vspeaker sink_properties=device.description=virtual_speaker

when I open for example discord, I am able to select as an output device for discord vitual_speaker but I am not able to somehow redirect it to my actual headphones which are not a virtual sink.

OBS Studio provides the feature to monitor virtual sink and redirect its output to my headphones but It has a few seconds latency which is not suitable for what I need it for.

I tried to do something like this

pactl load-module module-null-sink sink_name=vspeaker sink_properties=device.description=virtual_speaker

but then I cannot see any new output device in applications nor hear something from virtual sink. It just selected my headphones. I tried to run it with $ PULSE_SINK=virtual_sink APP_NAME but without any effect.

Is there a way to monitor or redirect virtual sink audio to actual headphones without big latency? (Something like Voicemeeter for Windows)

David avatar
cn flag
This link MIGHT help. https://www.onetransistor.eu/2017/10/virtual-audio-cable-in-linux-ubuntu.html
Score:0
mx flag

You are very close you need to run two commands:

  1. Create your null-sink.
pactl load-module module-null-sink sink_name=Redirected_Audio sink_properties=device.description=Redirected_Audio
  1. Redirect your new null-sink "Redirected_Audio" into your headphones.
pactl load-module module-loopback source=Redirected_Audio.monitor sink=name_of_headphones

Notice that there is .monitor after the name of my null sink Redirected_Audio, this is necessary. If you change the name of your sink be sure to include .monitor in this command.

But what is the name of your headphones?

Run pactl list sinks and find the one that is your speakers, the attribute is just called Name it can be quite long but depends entirely on the model, for example my headphones appear as:

Sink #1
    State: RUNNING
    Name: alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo
    Description: PCM2902 Audio Codec Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 23
    Mute: no
    Volume: front-left: 11796 /  18% / -44.68 dB,   front-right: 11796 /  18% / -44.68 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo.monitor
    Latency: 22938 usec, configured 26000 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "USB Audio"
        alsa.id = "USB Audio"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "1"
        alsa.card_name = "USB Audio CODEC"
        alsa.long_card_name = "Burr-Brown from TI USB Audio CODEC at usb-0000:2a:00.1-5, full speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:2a:00.1-usb-0:5:1.0"
        sysfs.path = "/devices/pci0000:00/0000:00:01.2/0000:20:00.0/0000:21:08.0/0000:2a:00.1/usb1/1-5/1-5:1.0/sound/card1"
        udev.id = "usb-Burr-Brown_from_TI_USB_Audio_CODEC-00"
        device.bus = "usb"
        device.vendor.id = "08bb"
        device.vendor.name = "Texas Instruments"
        device.product.id = "2902"
        device.product.name = "PCM2902 Audio Codec"
        device.serial = "Burr-Brown_from_TI_USB_Audio_CODEC"
        device.string = "front:1"
        device.buffering.buffer_size = "352800"
        device.buffering.fragment_size = "176400"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analogue Stereo"
        device.description = "PCM2902 Audio Codec Analogue Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
    Ports:
        analog-output: Analogue Output (priority: 9900)
    Active Port: analog-output
    Formats:
        pcm

The name is alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.