[pulseaudio-discuss] Virtualbox sound management

Colin Guthrie gmane at colin.guthr.ie
Fri Oct 22 01:08:13 PDT 2010

> 'Twas brillig, and Colin Guthrie at 21/10/10 16:42 did gyre and gimble:
>> Are you saying you want VM1 to record (via it's input) only the sounds
>> that VM1 produces and to make VM2 record only the sounds VM2 produces?
>> If so this can be done, but I'll wait for you to confirm that this is
>> really what you want before describing it.

> Yes absolutly colin !!
>  VM 1 is playing and recording (in fact streaming) VM 1  and
>  VM 2 is playing and recording (in fact streaming) VM 2 
> That's all !!!
> There is no interest for me to record silence..... 

Ahh OK, that's easy then, but sadly not something that can be restored
automatically at "boot" time. You will have to make a manual change -
unless the VirtualBox output is changed to set VM-specific stream
restore ids (more on that later).

Just load two null sinks.

load-module module-null-sink sink_name=vm1
load-module module-null-sink sink_name=vm2

Then start up both your VMs.

Open pavucontrol on your host machine.

Under "Playback" (first tab) you should see both your VMs listed - their
names should be shown there too.

Wire them up as you would expect: vm1 => vm1 sink, vm2 => vm2 sink.

Then under "Recording" (second tab) you should see both your VMs listed
as well. Wire them up as you'd expect: vm1 => "Monitor of vm1", vm2 =>
"Monitor of vm2"

That's it.

Like I say, we sadly will not be able to restore this automatically as
the stream restore id we use for recording application->device
information is sadly the same for both vms:


In theory, it would be nice if Virtualbox could set a
"module-stream-restore.id" property on it's streams. This is perhaps a
fairly easy hack to make in the Virtualbox source code....




Colin Guthrie

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list