PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
4ec89c27 by Igor V. Kovalenko at 2021-05-03T10:49:32+00:00
bluetooth: adjust sync to source with different sample spec

Part-of: 
<https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/544>

- - - - -


1 changed file:

- src/modules/bluetooth/module-bluez5-device.c


Changes:

=====================================
src/modules/bluetooth/module-bluez5-device.c
=====================================
@@ -1407,7 +1407,10 @@ static void thread_func(void *userdata) {
                          * If source and sink sample specifications are not 
equal,
                          * expected write size needs to be adjusted 
accordingly.
                          */
-                        bytes_to_write += n_read;
+                        if (pa_sample_spec_equal(&u->encoder_sample_spec, 
&u->decoder_sample_spec))
+                            bytes_to_write += n_read;
+                        else
+                            bytes_to_write += 
pa_usec_to_bytes(pa_bytes_to_usec(n_read, &u->decoder_sample_spec), 
&u->encoder_sample_spec);
                         blocks_to_write += bytes_to_write / 
u->write_block_size;
                         bytes_to_write = bytes_to_write % u->write_block_size;
                     }



View it on GitLab: 
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/4ec89c27c999a2cb01828601d1207473f1e0131e

-- 
View it on GitLab: 
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/4ec89c27c999a2cb01828601d1207473f1e0131e
You're receiving this email because of your account on gitlab.freedesktop.org.


_______________________________________________
pulseaudio-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits

Reply via email to