[pulseaudio-discuss] set media.role for VMware client

Sean Greenslade sean at seangreenslade.com
Fri Feb 11 08:13:26 UTC 2022


On Thu, Feb 03, 2022 at 06:00:27PM +0100, sben1783 wrote:
> Am 2022-01-24 07:29, schrieb Sean Greenslade:
> > On Wed, Jan 19, 2022 at 05:36:10PM +0100, sben1783 wrote:
> > [...]
> > > BUT: it doesn't "uncork" when my phone call within vmware is done. I
> > > think
> > > this is supposed to work..? My media player just stays muted
> > > forever. Any
> > > hints here? Where would I have to start looking to possibly find
> > > details
> > > why it doesn't unmute the media player?
> > 
> > I'm assuming you're using module-role-cork for this.
> 
> Yes, at least that's what I am think being new to this issue:)
> 
> > If I had to guess at the issue (not being a VMWare user myself), the
> > vmware client might be holding open its audio stream indefinitely once
> > initialized.  You can check this by starting and ending a call, then
> > looking at the list of current sink inputs:
> > 
> > $ pactl list sink-inputs
> 
> Again you guessed right, the stream stays open until I finally close the
> vmware session. As you asked above whether I am using module-role-cork: is
> there any alternative I could use that would work even with the stream
> staying open? Like based on actual stream usage or so?

Nothing that I'm aware of, unfortunately. I don't think it would be all
that difficult to make, either as a modified pulseaudio module or as an
external helper utility. You would need to read the actual audio samples
to determine whether the sink input is actually producing sound, which
probably precludes using high-level libraries like python-pulsectl. The
C code to do this isn't particularly scary; in fact, I wrote a little
demo CLI VU meter that could pretty easily be adapted into an audio
detector:

https://seangreenslade.com/tmp/2016_pulseaudio_VU_demo.c

If you'd like to go down a slightly different route, and duck / fade the
audio instead of corking it, I have a somewhat meandering blog post
where I describe routing pulse's streams through JACK to make use of its
more complex nodegraph routing system and fancier audio plugins:

https://seangreenslade.com/projects/2020-05_stream_audio_processing/

--Sean



More information about the pulseaudio-discuss mailing list