mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
clock: set rate correctly
The ticks multiplied by the rate should give the time in seconds.
This commit is contained in:
parent
d181574520
commit
26fa9eae39
5 changed files with 10 additions and 10 deletions
|
|
@ -571,7 +571,7 @@ static void alsa_on_playback_timeout_event(struct spa_source *source)
|
|||
|
||||
if (state->clock) {
|
||||
state->clock->nsec = SPA_TIMESPEC_TO_TIME(&state->now);
|
||||
state->clock->rate = SPA_FRACTION(state->rate, 1);
|
||||
state->clock->rate = SPA_FRACTION(1, state->rate);
|
||||
state->clock->position = state->sample_count;
|
||||
state->clock->delay = state->filled;
|
||||
}
|
||||
|
|
@ -643,7 +643,7 @@ static void alsa_on_capture_timeout_event(struct spa_source *source)
|
|||
|
||||
if (state->clock) {
|
||||
state->clock->nsec = SPA_TIMESPEC_TO_TIME(&state->now);
|
||||
state->clock->rate = SPA_FRACTION(state->rate, 1);
|
||||
state->clock->rate = SPA_FRACTION(1, state->rate);
|
||||
state->clock->position = state->sample_count;
|
||||
state->clock->delay = avail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue