[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] bluetooth: align max renderable block size to frame size
PulseAudio Marge Bot
gitlab at gitlab.freedesktop.org
Wed Dec 30 08:19:43 UTC 2020
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
4874f8a6 by Igor V. Kovalenko at 2020-12-30T01:18:41+03:00
bluetooth: align max renderable block size to frame size
When bluez5 device I/O thread detects it is too slow sending data, allow it to
skip up to max rendered block size bytes which must be aligned to frame size.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/449>
- - - - -
1 changed file:
- src/modules/bluetooth/module-bluez5-device.c
Changes:
=====================================
src/modules/bluetooth/module-bluez5-device.c
=====================================
@@ -1484,7 +1484,7 @@ static void thread_func(void *userdata) {
if (bytes_to_send > 2 * u->write_block_size) {
uint64_t skip_bytes;
pa_memchunk tmp;
- size_t mempool_max_block_size = pa_mempool_block_size_max(u->core->mempool);
+ size_t max_render_size = pa_frame_align(pa_mempool_block_size_max(u->core->mempool), &u->encoder_sample_spec);
pa_usec_t skip_usec;
skip_bytes = bytes_to_send - 2 * u->write_block_size;
@@ -1497,8 +1497,8 @@ static void thread_func(void *userdata) {
while (skip_bytes > 0) {
size_t bytes_to_render;
- if (skip_bytes > mempool_max_block_size)
- bytes_to_render = mempool_max_block_size;
+ if (skip_bytes > max_render_size)
+ bytes_to_render = max_render_size;
else
bytes_to_render = skip_bytes;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/4874f8a607b62b496aa0a1f6c1f0c3e8570195ae
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/4874f8a607b62b496aa0a1f6c1f0c3e8570195ae
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201230/31e16a9d/attachment.htm>
More information about the pulseaudio-commits
mailing list