[pulseaudio-discuss] Problem using the Simple API
lennart at poettering.net
Fri Oct 30 17:49:03 PDT 2009
On Fri, 30.10.09 17:39, eric (ekilfoil at gmail.com) wrote:
> Perhaps I'm misunderstanding the usage. I'm basically opening a stream,
> reading from the stream, sending it to a pipe, and then closing the stream.
> I can understand that once I open the stream, data will be buffered and
> waiting to be read. I would not expect to receive data from before that
> point. In fact, I'm pretty sure I'm *not* receiving data from before the
> stream is opened.
I am sorry, but I still have not understood what exactly is happening
that you don't expect to be happening, resp. what exactly is not
happening that you expect to happen.
Note that synchronization should be done based on latency
measurements, i.e. pa_simple_get_latency(), instead of wishing and
hoping and thinking and praying. ;-)
> If it is possible that I'm receiving data from before the pa_simple_new(),
> is there a way to clear everything when I open a recording stream?
> Again, this was not an issue in 0.9.14 and this works as expected *as long
> as the pulse audio device chooser volume manager is open*.
Are you sure you mean padevchooser? That tool is obsolete. Don't use it.
I'd guess you are actually using pavucontrol. If that runs the latency
of all audio devices is shortened (from the default of 2s to something
near 100ms or so), so that the real-time volume meters it shows are
nicely in sync with what you hear. Lower latency means shorter
buffer. Shorter buffer means you get less data at a time.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the pulseaudio-discuss