Hello Colin, <br> Thank you for your answer , So I fear that it is not possible to have several "fake" sinks (one per VM)....<br><br>Unfortunatly when I load a other fake one, got 'failed'<br><br>see above <br>
administrateur@23390hd61252:~$ pacmd load-module module-null-sink sink_name=fake<br>Welcome to PulseAudio! Use "help" for usage information.<br>>>> Module load failed.<br>>>> administrateur@23390hd61252:~$ <br>
<br>So... I fear that I have to ask for a sound card (it is a server "in box" , can be not easy) <br><br>Is it right ? <br><br><br><br><div class="gmail_quote">2010/10/19 Colin Guthrie <span dir="ltr"><<a href="mailto:gmane@colin.guthr.ie">gmane@colin.guthr.ie</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">'Twas brillig, and Fabrice Beauvir at 19/10/10 10:41 did gyre and gimble:<br>
<div class="im">> On a Ubuntu 9.04 server running pulse audio without any sound card I run<br>
> 2 Windows XP virtual box .<br>
><br>
> Sound is Ok and on both of them , I am playing on the current virtual<br>
> sound card (mapped on each vbox instance) and stream directly using<br>
> virtual card as input on each .<br>
><br>
> but....<br>
><br>
> On both stream sound is mixed , I heard the 2 sounds mixed out on each<br>
> one !!!<br>
<br>
</div>Ahh right, yes this is simple to explain, but rather more complex to fix.<br>
<br>
Ultimately PulseAudio uses a "module-null-sink" when no real hardware is<br>
found. This means that a dummy sound card is essentially provided. This<br>
is created automatically by module-always-sink so that applications<br>
generally find "somethign" to output to (as without this, alsa<br>
applications going via alsa->pulse bridge often got, erm, "confused" is<br>
a nice term :D)<br>
<br>
Anyway, the point is that this module only provide a virtual null<br>
*output*, and there is no virtual null *input*.<br>
<br>
Well, I say there is no null input but there *is* a "monitor" input for<br>
the virtual output (a monitor basically acts as a pretend input that<br>
allows you to record what is being currently played - think of how bands<br>
perform at live gigs - they use monitors there to make sure they don't<br>
sound crap!)<br>
<br>
<br>
Anyway, when VirtualBox is recording it has to record form some source<br>
in PA. As a side effect of the virtual output, the *only* input it can<br>
record from is the montitor of this virtual input. As both VMs output to<br>
the same virtual null sink in PA, their sound is mixed. Therefore when<br>
either of them record, they get the product of the mixed audio from the<br>
monitor.<br>
<br>
So that explains things. How to fix?<br>
<br>
Well there is no module-null-source (there arguably should be on written<br>
but no one has done this yet).<br>
<br>
So a trick here would be to load a second null sink and set *it's*<br>
monitor source as the default source, but never actually play anything<br>
on it. This way you can happily "record" the silence inside the VMs and<br>
that should be OK.<br>
<br>
Hope that makes sense!<br>
<br>
<br>
You'd have to do something like:<br>
<br>
pacmd load-module module-null-sink sink_name=fake<br>
pacmd set-default-source fake.monitor<br>
<br>
(you can also put this in your <a href="http://default.pa" target="_blank">default.pa</a> so it's done automatically)<br>
<br>
You'll likely need to restart your VMs to make sure they then use the<br>
right devices.<br>
<br>
Hope that helps.<br>
<br>
Col<br>
<br>
--<br>
<br>
Colin Guthrie<br>
gmane(at)<a href="http://colin.guthr.ie" target="_blank">colin.guthr.ie</a><br>
<a href="http://colin.guthr.ie/" target="_blank">http://colin.guthr.ie/</a><br>
<br>
Day Job:<br>
Tribalogic Limited [<a href="http://www.tribalogic.net/" target="_blank">http://www.tribalogic.net/</a>]<br>
Open Source:<br>
Mageia Contributor [<a href="http://www.mageia.org/" target="_blank">http://www.mageia.org/</a>]<br>
PulseAudio Hacker [<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a>]<br>
Trac Hacker [<a href="http://trac.edgewall.org/" target="_blank">http://trac.edgewall.org/</a>]<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br>