I wrote a super-simple test using the pa_simple API.  I have some
sound data in a static array.  I call getchar(), and then call
pa_simple_write, in an infinite loop.  When I run this, and just hit
enter several times, I expect to hear the sound played once each time
I press enter.  Instead, it plays nothing the first time, but then
plays it twice the second time I press enter, nothing the third time,
twice on the fourth and so on.

I ran this in gdb, and saw something super-strange.  The first two
times pa_simple_write was called, no sounds was played.  However, when
the next call the getchar() was made, both sounds played!  Somehow
getchar() is interacting with the sound queues!

I ran this test in Ubuntu Karmic.  Can anyone else confirm this
strange behavior?  If nothing else, I'd love to find out if this is
Ubuntu specific.  I've attached the source code.  Just type 'make' in
the keyspeak directory.

Thanks,
Bill

Attachment: keyspeak.tar.gz
Description: GNU Zip compressed data

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to