diff options
author | Igor V. Kovalenko <igor.v.kovalenko@gmail.com> | 2023-02-09 13:28:29 +0300 |
---|---|---|
committer | PulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org> | 2023-02-10 12:45:48 +0000 |
commit | 300db779224625144d6279d230c2daa857c967d8 (patch) | |
tree | 5c74df1b2d15552e5bfeec9e44003e5780e42217 /src/pulsecore/pstream.h | |
parent | 5830e03036f51fc06687e61be000708b464a094e (diff) | |
download | pulseaudio-300db779224625144d6279d230c2daa857c967d8.tar.gz |
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>
Diffstat (limited to 'src/pulsecore/pstream.h')
-rw-r--r-- | src/pulsecore/pstream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h index 2bff270ad..88bdca4cc 100644 --- a/src/pulsecore/pstream.h +++ b/src/pulsecore/pstream.h @@ -51,7 +51,7 @@ void pa_pstream_unlink(pa_pstream *p); int pa_pstream_attach_memfd_shmid(pa_pstream *p, unsigned shm_id, int memfd_fd); void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, pa_cmsg_ancil_data *ancil_data); -void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk); +void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, size_t align); void pa_pstream_send_release(pa_pstream *p, uint32_t block_id); void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id); |