[pulseaudio-discuss] Single char silence with Orca and pulseaudio

Bill Cox waywardgeek at gmail.com
Fri Dec 25 01:40:31 PST 2009


You are correct.  When I rewrote the pulse audio driver for
speech-dispatcher based on Luke's code, and the code I found in libao,
I was able to set some buffer parameters and get things working.

Bill

On Thu, Dec 24, 2009 at 12:38 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Sun, 20.12.09 07:22, Bill Cox (waywardgeek at gmail.com) wrote:
>
>> Hi.
>>
>> I'm trying to debug a problem in Ubuntu Lucid that appears to be
>> pulseaudio related.  When we set the speech rate of espeak to 100% in
>> Orca, and enable key echo, the keys are not announced when pressed.
>> Instead, when you type one key, no sound is played, but when you press
>> another key, both keys are played.
>>
>> I've traced this bug from Espeak to libao and now to pulseaudio.
>> Libao is using the pa_simple_write function to play speech sounds.  I
>> find that when sounds of over about 2000 samples are sent, then then
>> sound is played.  If sounds of less than 2000 samples are sent, then
>> they are not played, and instead buffered somewhere until the next
>> sample is passed to pa_simple_write.
>>
>> Would anyone have any idea of what might be causing this, or what area
>> I should inspect more closely?  Currently, I'm using fprintf commands
>> to trace the pulseaudio source.  So far, I've traced this from
>> simple.c to stream.c to pstream.c, where I see the samples being
>> queued.  From there, I'm a bit lost about how the samples are moved
>> along.
>
> You probably figured this out already, given the other traffic on the
> ML, but just to write this down here for all eternity (i.e. folks
> googling through the mailing list archives): this is caused by the
> prebuffering. By default PA will not start playback until the playback
> buffer is filled at least once.
>
> That is actually not much different with other audio engines, except
> maybe that usually the PA buffers are larger than hw buffers. An
> applicatin that makes assumptions about the start thresholds (alias
> "prebuf") is broken and needs to be fixed, either by writing proper
> silence, or by setting prebuf properly, or by triggering a
> pa_stream_flush() call.
>
> Lennart
>
> --
> Lennart Poettering                        Red Hat, Inc.
> lennart [at] poettering [dot] net
> http://0pointer.net/lennart/           GnuPG 0x1A015CC4
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>



More information about the pulseaudio-discuss mailing list