If you want gstreamer to be efficent in an embedded device you really have to crank up the buffers. This can be done by changing the "buffer-time" and "latency-time" on the pulsesink. I use this instead of an alsasink. I generally use times like 180ms for buffer and 60ms for latency. The properties come from the base class audio ring buffer that the pulse sink derives from. I believe the alsasink is the same way.
<br><br>I have tried another hack that made the alsa-pulse plugin refuse to set small buffers. This was by changing the capabilites function of the alsa plugin to say that there was a minimum frag size of like 16kb or something. This helped for native alsa applications.
<br><br>The biggest problem you will find with running it on the XO, (i've said this before on the list) is resampling, mixing, and software volume. Resampling has a little hope as there is a decent fixed point library from speex that is close to being done and released. It's not hard to integrate.
<br><br>As for mixing and software volume, there need to be a lot of change. I am currently using a library by my processor vendor for all three of these areas.<br><br>A few hints for lowering CPU usage Use autoload for the alsasink with a quick timeout. Pulse will use 0% when no audio is playing. Use large fragment sizes, my alsasink works in 6kb increments right now.
<br><br>Keith Preston<br><br><br><br><br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">Simon Schamijer</b> <<a href="mailto:simon@schampijer.de">simon@schampijer.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I have put up a site where I posted my tests on using pulseaudio within<br>the OLPC environment.<br><br><a href="http://wiki.laptop.org/go/Pulseaudio">http://wiki.laptop.org/go/Pulseaudio</a><br><br>Please feel free to add and comment.
<br><br>What I am a bit puzzled about is the gstreamer section. When using alsa<br> or native clients I can run pulseaudio with sr=44100Hz on the XO.<br>When it comes to use csound, gstreamer or the sdl-mixer I have to go
<br>down to 22kHz and you have to use large buffers in both csound and<br>sdl-mixer to avoid clicking. This seams not to help with gstreamer. When<br>gstreamer is connected you have mostly a click at the beginning of the<br>
playback.<br><br>I changed the fragment settings of the ALSA module of pulseaudio and<br>tried to change the buffer settings in gstreamer as well.<br><br>gst-launch-0.10 filesrc location=/home/olpc/guitcello.ogg ! oggdemux !
<br>vorbisdec ! audioconvert ! 'buffer-size=2048'<br><br>add-autoload-sink output module-alsa-sink device=plughw:0,0 rate=22050<br>sink_name=output fragments=12 fragment_size=1024<br><br>No luck so far. More details on the tests can be found on the wiki side.
<br>Maybe someone here has an idea what else I could try.<br><br>Best,<br> Simon<br>_______________________________________________<br>pulseaudio-discuss mailing list<br><a href="mailto:pulseaudio-discuss@mail.0pointer.de">
pulseaudio-discuss@mail.0pointer.de</a><br><a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br></blockquote></div><br>