Skip to content

Commit

Permalink
Update documentation with adjustment to prevent loopback switching
Browse files Browse the repository at this point in the history
source/sink

Today after a system update I noticed my denoised microphone source
wasn't outputting any sound.  This was a bit perplexing since I hadn't
recompiled or changed my pulse configuration.

I tried using the NoiseTorch project and found that it worked just fine,
so my pulse audio configuration seemed to be the cause. After a bit of
digging through pulseaudio's output, I found a line of interest:

`I: [pulseaudio] source.c: The source output 0 "(null)" is moving to
denoised due to change of the default source.`

I found that in my case source output 0 was the module-loopback.  The
source output changing sources broke the module chain and my actual
source was no longer being chained to the noise suppression plugin.

I found the `source_dont_move` and `sink_dont_move` options for the
loopback module here:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-loopback.
These seem to be desirable options for this setup since we want the sink
and source in the loopback module to stay consistent.
  • Loading branch information
Mikhail Swift authored and werman committed Oct 10, 2020
1 parent 4ff0989 commit 15bac8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Then, create the new device using:
```sh
pacmd load-module module-null-sink sink_name=mic_denoised_out rate=48000
pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/path/to/librnnoise_ladspa.so control=50
pacmd load-module module-loopback source=<your_mic_name> sink=mic_raw_in channels=1
pacmd load-module module-loopback source=<your_mic_name> sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
```

This needs to be executed every time PulseAudio is launched.
Expand All @@ -50,7 +50,7 @@ You can automate this by creating file in `~/.config/pulse/default.pa` with the
load-module module-null-sink sink_name=mic_denoised_out rate=48000
load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/path/to/librnnoise_ladspa.so control=50
load-module module-loopback source=your_mic_name sink=mic_raw_in channels=1
load-module module-loopback source=your_mic_name sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
set-default-source mic_denoised_out.monitor
```
Expand Down

0 comments on commit 15bac8f

Please sign in to comment.