mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
jack: use server timestamp when we can
This commit is contained in:
parent
87bee58f49
commit
6cde4e76d3
1 changed files with 3 additions and 4 deletions
|
|
@ -817,21 +817,20 @@ on_rtsocket_condition(void *data, int fd, enum spa_io mask)
|
||||||
else
|
else
|
||||||
sample_rate = c->sample_rate;
|
sample_rate = c->sample_rate;
|
||||||
c->rate_diff = c->position->clock.rate_diff;
|
c->rate_diff = c->position->clock.rate_diff;
|
||||||
nsec = c->position->clock.nsec;
|
|
||||||
frame = c->position->clock.position;
|
frame = c->position->clock.position;
|
||||||
delay = c->position->clock.delay;
|
delay = c->position->clock.delay;
|
||||||
|
nsec = c->position->clock.nsec;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buffer_size = DEFAULT_BUFFER_SIZE;
|
buffer_size = DEFAULT_BUFFER_SIZE;
|
||||||
sample_rate = DEFAULT_SAMPLE_RATE;
|
sample_rate = DEFAULT_SAMPLE_RATE;
|
||||||
c->rate_diff = 1.0;
|
c->rate_diff = 1.0;
|
||||||
nsec = 0;
|
|
||||||
frame = c->jack_position.frame + buffer_size;
|
frame = c->jack_position.frame + buffer_size;
|
||||||
delay = 0;
|
delay = 0;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
nsec = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
nsec = SPA_TIMESPEC_TO_NSEC(&ts);
|
|
||||||
c->activation->status = AWAKE;
|
c->activation->status = AWAKE;
|
||||||
c->activation->awake_time = nsec;
|
c->activation->awake_time = nsec;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue