mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
bluez5: media-sink: write packets exactly on time
Delay output by one packet, so that we never need to wait for node_process to supply more data when a packet is due out, and can write audio packets at exactly equal intervals (up to timer/io accuracy). In principle, this should not be necessary. However, enable it for now, in case this improves the various stutter/etc. bug reports.
This commit is contained in:
parent
f05e68e4d4
commit
99d5436f15
1 changed files with 5 additions and 2 deletions
|
|
@ -754,13 +754,16 @@ again:
|
|||
/ port->current_format.info.raw.rate);
|
||||
|
||||
/*
|
||||
* We could delay the output by one packet to avoid waiting
|
||||
* We can delay the output by one packet to avoid waiting
|
||||
* for the next buffer and so make send intervals exactly regular.
|
||||
* However, this is not needed for A2DP or BAP. The controller
|
||||
* will do the scheduling for us, and there's also the socket buffer
|
||||
* in between.
|
||||
*
|
||||
* Although in principle this should not be needed, we
|
||||
* do it regardless in case it helps.
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
this->next_flush_time += SPA_MIN(packet_time,
|
||||
duration_ns * (port->n_buffers - 1));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue