xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Version 4 and Version 5 of Sound


Ignore:
Timestamp:
01/07/13 10:46:27 (8 years ago)
Author:
Antoine Martin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Sound

    v4 v5  
    1616* a client with sound output of any kind (even virtual)
    1717* a server with pulseaudio (for going beyond the simple test step)
     18* users must be "pulseaudio-enabled" - whatever that means in terms of permissions and user setup (distribution specific)
    1819
    1920== Test Sound Source Setup ==
     
    5354== Test Remote Setup ==
    5455Using a second client machine (or a second desktop session, virtual machine, etc), we can connect this new client to the server and get the sound from the desktop session forwarded to the client.
    55 The server can be running the test source or a the desktop session's pulseaudio server. In the case of an existing pulseaudio server, simply start any sound application.
     56The server can be running the test source or a the desktop session's pulseaudio server. In the case of an existing pulseaudio server, simply start any sound application in the desktop session, the sound should come out in both this session's speakers (if any) and the client's speakers (if any / different!).
    5657{{{pavucontrol}}} on the server should show an Xpra entry in the {{{Recording}}} tab.
    5758The client should show an Xpra entry in the {{{Playback}}} tab (or whatever mixer/sound tool you have installed)
     59
     60== Full Setup ==
     61Finally, we may want an xpra session to use a dedicated pulseaudio server.
     62This is more difficult and at present, unless you really know what you are doing and are prepared to pickup the pieces, you should not attempt to do this as a user which already has an existing dbus session and pulseaudio server. Simply clearing the environment and trying to start a new pulseaudio instance will not work without some serious hacks to the environment variable that pulseaudio uses to find existing instances. [http://winswitch.org/about/ winswitch] will do this for you.
     63[[BR]]
     64Now, assuming that you have a dedicated user, '''without''' any form of dbus or pulseaudio server running. You should be able to setup a sound-capable environment by using a command line similar to this one:
     65{{{
     66dbus-launch xpra start :10 --no-pulseaudio \
     67  --start-child="pulseaudio --start --daemonize=false --system=false \
     68                --exit-idle-time=-1 -n --load=module-suspend-on-idle \
     69                --load=module-null-sink --load=module-native-protocol-unix \
     70                --log-level=4 --log-target=stderr"
     71}}}
     72Notes:
     73 * the {{{--no-pulseaudio}}} flag is there to prevent old support code from firing - this may get removed in the future.
     74 * you will need to use a tcp socket ({{{--bind-tcp=}}} or ssh forwarding to connect to this account - out of scope here.
     75 * we may well introduce new xpra command line options to simplify this setup process
     76
     77You should then see these messages in the server log:
     78{{{
     79(..)
     80D: [pulseaudio] main.c: Got org.PulseAudio1!
     81D: [pulseaudio] main.c: Got org.pulseaudio.Server!
     82I: [pulseaudio] main.c: Daemon startup complete.
     832013-01-07 17:42:55,732 xpra is ready.
     84}}}
     85And when connecting a sound capable client:
     86{{{
     87I: [pulseaudio] client.c: Created 0 "Native client (UNIX socket client)"
     88(...)
     892013-01-07 17:44:32,205 will send sound using mp3 codec
     90(...)
     912013-01-07 17:44:32,309 starting sound using null.monitor
     92D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes busy.
     93}}}
     94
     95And yet more log messages as your start a sound application in this xpra session.