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 14 and Version 15 of Sound


Ignore:
Timestamp:
01/23/13 18:22:18 (8 years ago)
Author:
Antoine Martin
Comment:

updated info to match pulseaudio changes in r2597

Legend:

Unmodified
Added
Removed
Modified
  • Sound

    v14 v15  
    99* a build/installation including gstreamer support for both client and server
    1010* a client with sound output of any kind (even virtual)
    11 * a server with pulseaudio (for going beyond the simple test step)
    12 * users must be "pulseaudio-enabled" - whatever that means in terms of permissions and user setup (distribution specific)
     11* a server with pulseaudio installed (for going beyond the simple test step)
     12* users must be "pulseaudio-enabled" - whatever that means in terms of permissions and user setup (policy, user group, etc: this is distribution specific)
    1313
    1414== Standalone Tests ==
    1515You can run the following test commands to run/test individual parts of the sound pipeline:
    16 * {{{./xpra/sound/gstreamer_util.py}}} (named {{{GStreamer_Info.exe}}}) on MS Windows) - will dump all the gstreamer plugins installed, validates that the gstreamer installation is functional
     16* {{{./xpra/sound/gstreamer_util.py}}} (named {{{GStreamer_Info.exe}}}) on MS Windows) - will dump all the gstreamer plugins installed, validates that the gstreamer installation is functional. At present, you will need at least the following plugins for mp3 encoding (mp3 is the default codec):
     17 * for the server: {{{pulsesrc}}}, {{{audioconvert}}}, {{{audioresample}}}, {{{lamemp3enc}}} and {{{appsink}}}
     18 * for the client: {{{appsrc}}}, {{{mp3parse}}}, {{{mad}}}, {{{volume}}}, {{{audioconvert}}}, {{{audioresample}}}, {{{queue}}} and {{{pulsesink}}}
    1719* {{{./xpra/sound/pulseaudio_util.py}}} will list the pulseaudio devices found if a pulseaudio server is running
    18 * {{{./xpra/sound/src.py}}} will dump pulseaudio sound to file until interrupted ({{{Sound_Record.exe}}} on MS Windows)
     20* {{{./xpra/sound/src.py}}} will dump the sound coming from the pulseaudio server to a file until interrupted (named {{{Sound_Record.exe}}} on MS Windows)
    1921* {{{./xpra/sound/sink.py}}} will play a sound file until interrupted - a "cheap mp3 player" ({{{Sound_Play.exe}}} on MS Windows)
    2022
     
    2224== Test Sound Source Setup ==
    2325The easiest way of testing that a system is capable of forwarding and receiving sound is on a Posix system (Linux, BSD, etc).
    24 Using the {{{XPRA_SOUND_TEST}}} environment variable, we can instruct the xpra server to use a fake sound source instead of hooking into a pulseaudio server:
     26Using the {{{XPRA_SOUND_TEST}}} environment variable, we can instruct the xpra server to use a fake sound source instead of hooking into a pulseaudio server (which we do not have to / want to start, yet):
    2527{{{
    26 XPRA_SOUND_TEST=1 xpra start :10
     28XPRA_SOUND_TEST=1 xpra start :10 --no-pulseaudio
    2729}}}
    2830Then we can just attach the client from the same system:
     
    3133}}}
    3234You should then hear a constant (rather annoying) tone.
    33 Getting this far ensures that sound forwarding does work on this system, albeit from a fake source instead of pulseaudio.
     35Getting this far ensures that sound forwarding does work on this system, albeit from a fake source instead of a pulseaudio server.
    3436
    3537== Simple Diagnostics ==
    3638Things to look for:
    3739* if the speaker is greyed out in the tray then sound is not enabled, check:
     40* the speaker and/or microphone options are enabled in the default {{{xpra.conf}}} file, remove any {{{--no-speaker}}} or {{{--no-microphone}}} options.
    3841* Session Info shows sound attributes in 'Features' (see example screenshots below)
    3942* "xpra info" should show the pipeline state when a client is playing sound:
     
    4952Check that pulseaudio is running in your Posix desktop:
    5053{{{
    51 pactl info
     54ps -ef | grep pulseaudio
    5255}}}
    5356Start an xpra server:
    5457{{{
    55 xpra start :10
     58xpra start :10 --no-pulseaudio
     59}}}
     60Or create a shadow of the current desktop session:
     61{{{
     62xpra shadow :0 --no-pulseaudio
    5663}}}
    5764Attach from the same machine:
     
    6976The 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!).
    7077{{{pavucontrol}}} on the server should show an Xpra entry in the {{{Recording}}} tab.
    71 The client should show an Xpra entry in the {{{Playback}}} tab (or whatever mixer/sound tool you have installed)
     78The client should show an Xpra entry in the {{{Playback}}} tab (or whatever mixer/sound tool you have installed) - see screenshots below.
    7279
    7380== Full Setup ==
    7481Finally, we may want an xpra session to use a dedicated pulseaudio server.
    75 This 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.
     82This 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 pulseaudio server running. Simply clearing the environment and trying to start a new pulseaudio instance will not work without some serious hacks to the environment variables that pulseaudio uses to find existing instances. If this is what you really want, [http://winswitch.org/about/ winswitch] will do this for you.
    7683[[BR]]
    77 Now, 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:
     84Now, assuming that you have a dedicated user, '''without''' any pulseaudio server running, and that the {{{pulseaudio}}} option is enabled (ie: no {{{--no-pulseaudio}}} command line option and no {{{pulseaudio = no}}} in the {{{xpra.conf}}} file). You should be able to setup a sound-capable environment by using simply:
    7885{{{
    79 dbus-launch xpra start :10 --no-pulseaudio \
     86xpra start :10
     87}}}
     88If, this does not work, you may want to try to start the pulseaudio server manually via:
     89{{{
     90xpra start :10 --no-pulseaudio \
    8091  --start-child="pulseaudio --start --daemonize=false --system=false \
    8192                --exit-idle-time=-1 -n --load=module-suspend-on-idle \
     
    8495}}}
    8596Notes:
    86  * the {{{--no-pulseaudio}}} flag is there to prevent old support code from firing - this may get removed in the future.
    8797 * you will need to use a tcp socket ({{{--bind-tcp=}}} or ssh forwarding to connect to this account - out of scope here.
    88  * we may well introduce new xpra command line options to simplify this setup process
    8998
    90 You should then see these messages in the server log:
     99The default {{{log-level}}} in the default {{{xpra.conf}}} file is low, but if you raise it to 4 or above (ie: if you use the explicit command line above to start pulseaudio), you should then see these messages in the server log:
    91100{{{
    92101(..)