mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-16 06:59:55 -05:00
pstream: Pass frame size to keep split memblock parts aligned
`pa_pstream_send_memblock()` would split incoming memblock into parts not exceeding maximum pool block size. To make sure split parts of memblock are still frame-aligned add new `align` arg to `pa_pstream_send_memblock`, find out required alignment from stream sample format and pass it there. Bump default alignment to 256 which is good up to 32bit 64ch frames. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/780>
This commit is contained in:
parent
5830e03036
commit
300db77922
5 changed files with 16 additions and 7 deletions
|
|
@ -676,7 +676,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
|
|||
* IO thread context where the rest of the messages are
|
||||
* dispatched. Yeah, ugly, but I am a lazy bastard. */
|
||||
|
||||
pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk);
|
||||
pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk, pa_frame_size(&u->sink->sample_spec));
|
||||
|
||||
u->receive_counter += chunk->length;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue