Changes between Version 14 and Version 15 of Sound
- Timestamp:
- 01/23/13 18:22:18 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Sound
v14 v15 9 9 * a build/installation including gstreamer support for both client and server 10 10 * 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) 13 13 14 14 == Standalone Tests == 15 15 You 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}}} 17 19 * {{{./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) 19 21 * {{{./xpra/sound/sink.py}}} will play a sound file until interrupted - a "cheap mp3 player" ({{{Sound_Play.exe}}} on MS Windows) 20 22 … … 22 24 == Test Sound Source Setup == 23 25 The 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 :26 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 (which we do not have to / want to start, yet): 25 27 {{{ 26 XPRA_SOUND_TEST=1 xpra start :10 28 XPRA_SOUND_TEST=1 xpra start :10 --no-pulseaudio 27 29 }}} 28 30 Then we can just attach the client from the same system: … … 31 33 }}} 32 34 You 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.35 Getting this far ensures that sound forwarding does work on this system, albeit from a fake source instead of a pulseaudio server. 34 36 35 37 == Simple Diagnostics == 36 38 Things to look for: 37 39 * 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. 38 41 * Session Info shows sound attributes in 'Features' (see example screenshots below) 39 42 * "xpra info" should show the pipeline state when a client is playing sound: … … 49 52 Check that pulseaudio is running in your Posix desktop: 50 53 {{{ 51 p actl info54 ps -ef | grep pulseaudio 52 55 }}} 53 56 Start an xpra server: 54 57 {{{ 55 xpra start :10 58 xpra start :10 --no-pulseaudio 59 }}} 60 Or create a shadow of the current desktop session: 61 {{{ 62 xpra shadow :0 --no-pulseaudio 56 63 }}} 57 64 Attach from the same machine: … … 69 76 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 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!). 70 77 {{{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) 78 The client should show an Xpra entry in the {{{Playback}}} tab (or whatever mixer/sound tool you have installed) - see screenshots below. 72 79 73 80 == Full Setup == 74 81 Finally, 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.82 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 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. 76 83 [[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:84 Now, 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: 78 85 {{{ 79 dbus-launch xpra start :10 --no-pulseaudio \ 86 xpra start :10 87 }}} 88 If, this does not work, you may want to try to start the pulseaudio server manually via: 89 {{{ 90 xpra start :10 --no-pulseaudio \ 80 91 --start-child="pulseaudio --start --daemonize=false --system=false \ 81 92 --exit-idle-time=-1 -n --load=module-suspend-on-idle \ … … 84 95 }}} 85 96 Notes: 86 * the {{{--no-pulseaudio}}} flag is there to prevent old support code from firing - this may get removed in the future.87 97 * 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 process89 98 90 You should then see these messages in the server log:99 The 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: 91 100 {{{ 92 101 (..)