protonscr

Monitor of Pulseaudio sink with LADSPA module not working

steamclosed Steam clientAudio
ValveSoftware/steam-for-linux#4997 · opened 2017-05-26 by lowlyocean · updated 2019-07-18 · 4 comments · github
Llowlyocean 2017-05-26 github

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist.

I run the following commands to create a pitch-shifted version of my microphone input (which I want to use in Steam). However, selecting the corresponding device in Voice options does not result in a pitch-shifted voice. Instead, the result is an unshifted voice.

pactl load-module module-null-sink
pactl load-module module-ladspa-sink master=null plugin=tap_pitch label=tap_pitch control=-8,0,-90,0 channels=1 rate=48000
pactl load-module module-loopback source=alsa_input.usb-046d_HD_Webcam_C525_46671310-00.analog-mono sink=null.ladspa latency_msec=1

Steps for reproducing this issue:

  1. Run the above commands, subsituting channels and rate with the appropriate settings for your own microphone. Make sure to use the correct source in the last command... check output of pacmd list-sources to find out the name of your input
  2. Load steam and change voice input to be Monitor of LADSPA Plugin TAP Pitch Shifter on Null Output
  3. Test microphone in Steam, hear your unmodified voice
Kkisak-valve maintainer 2017-05-26 github

~Hello @radical-equanimity, please test if other steam games are affected. If they are, edit your opening post and replace it with the referenced issue report, otherwise we will track it in the CS:GO issue tracker. It shouldn't be tracked in both places.~ Reading this more closely, it sounds unrelated to CS:GO

Llowlyocean 2017-05-26 github

There is evidence of an issue before even launching any game. The Steam client itself is all that's needed. Made this the primary location; CSGO points to this location. let me know if this isn't what is meant

Kkisak-valve maintainer 2017-05-26 github

Possibly related to #4272.

Llowlyocean 2017-05-27 github

Alright... I've figured out what's wrong. If you want to do this, you need to have a file ~/.config/pulse/default.pa with the following contents. Replace source with your actual mic device. Notice that default source is not null.lapsda.monitor but instead it is null.monitor.

.include /etc/pulse/default.pa

load-module module-null-sink
load-module module-ladspa-sink master=null plugin=tap_pitch label=tap_pitch control=-8,0,-90,0 channels=1 rate=48000
load-module module-loopback source=alsa_input.usb-046d_HD_Webcam_C525_46671310-00.analog-mono sink=null.ladspa latency_msec=500

set-default-sink alsa_output.pci-0000_00_1b.0.iec958-stereo
set-default-source null.monitor

It also turns out that in CSGO specifically, OpenAL does not allow the user to switch Pulseaudio streams by default. See the last comment here: https://github.com/ValveSoftware/csgo-osx-linux/issues/97 . To fix this, we need to create a file ~/.alsoftrc with the following contents:

[pulse]
allow-moves=true

Once this is done, user should enter a CSGO game with bots, enter command '+voicerecord' in console, switch to pavucontrol's Recording tab and change csgo_linux64 to capture stream to "Monitor of Null output"

Nothing extracted yet.