Changes between Version 22 and Version 23 of Sound
- Timestamp:
- 12/11/13 10:19:37 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Sound
v22 v23 1 {{{#!div class="box" 1 2 = Sound = 2 3 3 4 Once the sound has started forwarding (and not before), you may get more diagnostic messages by setting {{{XPRA_SOUND_DEBUG=1}}}. (see [/wiki/Debugging Debugging]) 4 5 {{{XPRA_SOUND_QUEUE_TIME}}} can be used to control the default amount of buffering on the receiver. 6 }}} 5 7 8 9 {{{#!div class="box" 6 10 == Status and Platform Quircks == 7 Sound is fairly stable in v0.9.x onwards on Posix platforms, as long as you use the latest version (see #396), there are still quirks to be ironed out for MS Windows (see #362) and OSX (see #379) 11 Sound is fairly stable in v0.9.x onwards on Posix platforms, as long as you use the latest version (see #396), there are still quirks to be ironed out for MS Windows (see #362) and OSX (see #379). 12 [[BR]] 13 The only codec that is widely used is '''mp3'''. 14 15 [[BR]] 8 16 9 17 Useful development documentation: … … 12 20 * [http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html Buffering] 13 21 * [http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+12%3A+Streaming Basic tutorial: Streaming] 22 }}} 14 23 15 24 25 {{{#!div class="box" 16 26 == Requirements == 17 27 You will need: … … 20 30 * a server with pulseaudio installed (for going beyond the simple test step) 21 31 * users must be "pulseaudio-enabled" - whatever that means in terms of permissions and user setup (policy, user group, etc: this is distribution specific) 32 }}} 22 33 34 35 {{{#!div class="box" 23 36 == Standalone Tests == 24 37 You can run the following test commands to run/test individual parts of the sound pipeline: … … 29 42 * {{{./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) 30 43 * {{{./xpra/sound/sink.py}}} will play a sound file until interrupted - a "cheap mp3 player" ({{{Sound_Play.exe}}} on MS Windows) 44 }}} 31 45 32 46 47 {{{#!div class="box" 33 48 == Test Sound Source Setup == 34 49 The easiest way of testing that a system is capable of forwarding and receiving sound is on a Posix system (Linux, BSD, etc). … … 43 58 You should then hear a constant (rather annoying) tone. 44 59 Getting this far ensures that sound forwarding does work on this system, albeit from a fake source instead of a pulseaudio server. 60 }}} 45 61 46 62 63 {{{#!div class="box" 47 64 == Test Sound Output == 48 65 Since we use [http://gstreamer.freedesktop.org/ GStreamer] for sound support, the first thing to do is to check if gstreamer sound output works on your system. … … 53 70 If the {{{autoaudiosink}}} does not work for you, you may want to try other options (availability varies): {{{pulsesink}}} ({{{PulseAudio}}}), {{{osxaudiosink}}} (OSX), {{{directsoundsink}}} (MS Windows), {{{alsasink}}} / {{{osssink}}} / {{{oss4sink}}} / {{{jackaudiosink}}} (Posix). 54 71 If this does not work, please refer to [http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html Running GStreamer Applications] documentation (in particular {{{GST_DEBUG}}}) 72 }}} 55 73 74 75 {{{#!div class="box" 56 76 == Simple Diagnostics == 57 77 Things to look for: … … 65 85 }}} 66 86 * {{{pavucontrol}}} both on the client and inside the xpra session (see example screenshots below) 87 }}} 67 88 89 90 {{{#!div class="box" 68 91 == Using an existing pulseaudio server == 69 92 Next, we want to add pulseaudio, but without starting it ourselves, so we can simply re-use the existing server that gets started with most modern desktops. … … 90 113 }}} 91 114 Getting this far should ensure that all the components are installed, enabled and that the xpra server found the pulseaudio device to connect to. 115 }}} 92 116 117 118 {{{#!div class="box" 93 119 == Test Remote Setup == 94 120 Using 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. … … 96 122 {{{pavucontrol}}} on the server should show an Xpra entry in the {{{Recording}}} tab. 97 123 The client should show an Xpra entry in the {{{Playback}}} tab (or whatever mixer/sound tool you have installed) - see screenshots below. 124 }}} 98 125 126 127 {{{#!div class="box" 99 128 == Full Setup == 100 129 Finally, we may want an xpra session to use a dedicated pulseaudio server. … … 135 164 136 165 And yet more log messages as your start a sound application in this xpra session. 166 }}} 137 167 168 169 {{{#!div class="box" 138 170 == ALSA, OSS, etc == 139 171 The instructions above will make sound work with all applications that use pulseaudio for output. 140 172 For those that do not, please see [http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup PulseAudio Perfect Setup] to route their sound to pulseaudio. 173 }}} 141 174 142 175 143 176 {{{#!div class="box" 144 177 == Screenshots == 145 178 * Sound information displayed on session info (with speaker enabled and running and microphone disabled): … … 154 187 [[BR]] 155 188 [[Image(/raw-attachment/wiki/Sound/pavucontrol-server.png)]] 189 }}}