Re: How to combine microphone audio and music from application to pipe to video conference

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

 



Sean Greenslade wrote on 5/24/20 1:44 AM:
On Sat, May 23, 2020 at 11:49:54AM -0400, Samir Parikh wrote:
Ok, I'm back after researching and trying some things a bit more.

Sean Greenslade wrote on 5/16/20 1:23 AM:
This is definitely possible entirely within pulseaudio. I'll go over the
basic concepts here, then show an example.
...
Now you can begin playing music, and in the Playback tab of pavucontrol
move the music playback to the VirtualMixer.

I got this far in following your instructions but got stumped on that last
part about moving the music playback to the VirtualMixer.  This screenshot
shows my options for where to direct the Rhythmbox output:
https://imgur.com/a/PRCYV3B

If I select VirtualMixer, playback of the music continues but I can no
longer hear it.  Is there a way for me to also hear it through my own
speakers/headset?

This is possible, but adds some complexity to the setup. To hopefully
make this easier to follow, I've made a little flowchart of all the
components:

https://dumbpic.link/manu/2020-05-23_pulse_diagram_mic_mix_with_mon.png

Remember that pulseaudio draws a distinction between sources and sinks,
and normally doesn't allow you to route a source to sink or vice-versa.
So source components have a rounded face, and sink components have a
pointed face.

Certain endpoints are "exclusive," meaning that they can only have one
thing connected to or from it. These points have a grey shading to
indicate that property.

Modules with a thick border are real hardware. Modules with a thin
border are software. The dotted line around "auto monitor" refers to the
fact that it is auto-created when a virtual sink is created.

The thick lines connecting modules are the routings within Pulse. These
routings can all be modified in realtime within pavucontrol.

Hopefully this makes enough sense to help you to augment your script.
For comparison, here's the flowchart for my original suggestion that
does not let you monitor the music:

https://dumbpic.link/manu/2020-05-23_pulse_diagram_mic_mix.png

--Sean

I've played with this a bit more to update my steps. I corrected some errors and I think I was able to piece together some more steps but still have a few open issues. Here's what I've got so far based on my revisions:
https://imgur.com/NzteBvg

Step 1:  Create the music_mic_mix virtual mixer
$ pacmd load-module module-null-sink sink_name=music_mic_mix
$ pacmd update-sink-proplist music_mic_mix device.description=music_mic_mix

Step 2: Create the mic_loop loopback module and specify the sink as the virtual mixer created in step 1 (music_mic_mix)
$ pacmd load-module module-loopback sink=music_mic_mix

Step 3:  Create the music_only virtual mixer
$pacmd load-module module-null-sink sink_name=music_only
$ pacmd update-sink-proplist music_only device.description=music_only

Step 4: Create the music_loop_headphones loopback module and specify my headphones output as the "real sink". (I found the name using the pacmd list-sinks command.) $ pacmd load-module module-loopback sink=alsa_output.usb-Plantronics_Plantronics_BT600.analog-stereo

Step 5: Create the music_loop_videoconf loopback module and specify the music_mic_mix created in step 1 as the sink
$ pacmd load-module module-loopback sink=music_mic_mix

Step 6: Connect the headset microphone to the mic_loop loopback module via the "Recording" tab in pavucontrol.

Step 7: Direct the output of Rhythmbox to the music_only virtual mixer created in step 3 via the "Playback" tab in pavucontrol.

Step 8: Direct the output of the music_mix_mix virtual mixer created in step 1 to the video conference application in the "Recording" tab of pavucontrol.

My question is how do I direct the output of the music_only virtual mixer created in step 3 to the music_loop_headphones and music_loop_videoconf loopback modules created in steps 4 and 5 (indicated by the red boxes in my revised diagram)?

Thanks
Samir
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss



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

  Powered by Linux