[Lxc-users] Fwd: LXC and sound in container
brian mullan
bmullan.mail at gmail.com
Fri Nov 15 12:13:00 UTC 2013
Stephane...
Thanks I'd seen what you'd done in the Arkose .py code but I didn't know
enough about
pulseaudio to understand it at the time.
> arkose basically runs:
> pactl load-module module-native-protocol-unix socket=/some/path
auth-cookie-enabled=0
>
> The bind-mounts that socket inside the container and exports
> PULSE_SERVER=/some/path in the container's environment.
Last night I spent several hours reading various pulseaudio writeups and
ended up experimenting
with using the "tcp" vs "unix" variation the PACTL load-module command:
Just for testing...
In my Container I first made sure PulseAudio module-native-protocol-tcp is
loaded and
limited access to the <host_IP> address
*pactl load-module module-native-protocol-tcp auth-ip-acl="<host_IP
address"*
then.. logged in via terminal I did the following:
*export PULSE_SERVER=<host IP>:4713*
note: 4713 is the pulseaudio port
then... just used aplay to see if it worked and - This worked Great... and
allows BOTH Host and Container to play sound concurrently...
*aplay /usr/share/sounds/alsa/Front_Center.wav*
All of the above was after I'd already created the /dev/snd device files
using the MKNOD script I'd described in my earlier email/document.
*NOTE: the good part of using the above was that I had sound playing on
my HOST OS ** simultaneously with the LXC Container aplay
doing sound in the container.*
This was VERY simple once I understood the PulseAudio side better. I used
the
*pactl load-module module-native-protocol-tcp*
instead of the
*pactl load-module module-native-protocol-unix*
*From what I read (tcp) was meant to allow sending Sound over a
network/wan which in my longer term use-case with remote desktops to
containers is what I want.*
I'll again try to re-write my previous doc as suggest by Serge into 2
different docs to make this all easier to follow. The overall sound
setup side should be a lot shorter & simpler.
Brian Mullan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20131115/583006ba/attachment.html>
More information about the lxc-users
mailing list