Pulseaudio is moving gstreamer pulsesrc device to the mic whenever a mic is plugged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-08-21 at 23:43 -0300, wellington wallace wrote:
> Hi,
> 
> Sorry to bother you again. But I have found a Pulseaudio's behavior that
> seems strange. Consider we have loaded a null sink device and that we then
> start to record from its monitor using a gstreamer pipeline with the
> pulsesrc plugin. Whenever I plug a microphone Pulseaudio moves the pulsesrc
> device from the null sink monitor to the plugged microphone. Is this
> supposed to happen? I am recording from a null sink monitor in my
> application through a gstreamer pipeline and this behavior totally breaks
> it.
> 
> I am using Pulseaudio 10.0 in a updated Arch Linux.

Do you have module-switch-on-connect loaded? Is the plugged in
microphone a USB device? The module is not loaded by default, but that
module is the only explanation I can think of for the behaviour you're
seeing. When a new source appears, module-switch-on-connect will move
streams from the old default source to the new source. According to my
theory, the default source is initially the null sink monitor in your
setup.

If you have module-switch-on-connect loaded, and want to keep it
loaded, then this workaround should work: set some other source as the
default source than the null monitor. If there are no other sources,
load another null sink, and set its monitor as the default source. You
should configure the original null sink's monitor as the source in your
pulsesrc pipeline if you haven't done that already, because otherwise
pulsesrc will record from the default source, and you want to avoid
recording from the default source.

This behaviour is not desirable, but fixing it is not trivial, and I
predict it won't be fixed any time soon.

-- 
Tanu

https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux