pa_sink_render(), minimum chunk.memblock length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 24.04.09 17:31, Baek Chang (baeksan at ccrma.stanford.edu) wrote:

> When calling pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result),
> is there a way to specify the minimum requested length for the chunk?  The
> length that is passed in, is the maximum request for the thread, but I don't
> see that there is a minimum requested length.  Is this set up by configuring
> the minimum requested latency when the sink is created?
> 
> In my module, I request 4096 bytes, and sometimes I get back 628.  When I
> request say 8192, I still get 628 sometimes.  Is there a relation to the max
> requested length of the memchunk and what is actually returned?

No, there is no lower limit that you could configure. This wouldn't
really fit into the zero-copy logic of PA because enforcing a minimal
block size like this would require merging multiple smaller blocks by
copying them together.

If you have device with fixed block sizes you can use
pa_sink_render_into() instead of pa_sink_render(). That will mix
exactly the requested amount of data into the buffer you pass to
it.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux