mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
modules: fix rate update
Setting the rate with the PROP_rate would actually result in a rate adjustment of 1.0f / rate, so do the same here. See #2891
This commit is contained in:
parent
73c5f6e1bf
commit
860b8fc27f
2 changed files with 2 additions and 2 deletions
|
|
@ -270,7 +270,7 @@ static void update_rate(struct impl *impl, bool playback)
|
|||
impl->current_latency, impl->target_latency);
|
||||
|
||||
SPA_FLAG_SET(impl->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE);
|
||||
impl->rate_match->rate = corr;
|
||||
impl->rate_match->rate = 1.0f / corr;
|
||||
}
|
||||
|
||||
static void playback_stream_process(void *d)
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ static void stream_process(void *data)
|
|||
|
||||
if (sess->rate_match) {
|
||||
SPA_FLAG_SET(sess->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE);
|
||||
sess->rate_match->rate = corr;
|
||||
sess->rate_match->rate = 1.0f / corr;
|
||||
}
|
||||
}
|
||||
spa_ringbuffer_read_data(&sess->ring,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue