mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: use position clock time
Use the position clock time and fall back to the monotonic time.
This commit is contained in:
parent
ebccd89ae1
commit
0cdcd04f77
1 changed files with 7 additions and 3 deletions
|
|
@ -1479,9 +1479,13 @@ static int impl_node_process(void *object)
|
|||
}
|
||||
if (!spa_list_is_empty(&port->ready)) {
|
||||
if (this->following) {
|
||||
struct timespec now;
|
||||
spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &now);
|
||||
this->current_time = SPA_TIMESPEC_TO_NSEC(&now);
|
||||
if (this->position) {
|
||||
this->current_time = this->position->clock.nsec;
|
||||
} else {
|
||||
struct timespec now;
|
||||
spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &now);
|
||||
this->current_time = SPA_TIMESPEC_TO_NSEC(&now);
|
||||
}
|
||||
}
|
||||
if (this->need_flush)
|
||||
reset_buffer(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue