mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-combine-stream: update latency right before playback starts
Combine stream selects the biggest latency from all output streams and sent the latency upstream. To select the biggest latency, each stream needs to have the sample rate and the quantum size set. The combine stream recalculates the latency in the latency changed callback or during data processing. Stream sets the sample rate and the quantum size in a copy_position call which is normally called during processing the output data or when state changes to streaming. Before this change, it wasn't guarantee the copy_position was called for each stream already and latency in the combine stream was selected from random stream. Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
parent
88963e9a9c
commit
ff3bc8818f
1 changed files with 3 additions and 0 deletions
|
|
@ -730,6 +730,9 @@ static void stream_state_changed(void *d, enum pw_stream_state old,
|
|||
case PW_STREAM_STATE_UNCONNECTED:
|
||||
stream_destroy(s);
|
||||
break;
|
||||
case PW_STREAM_STATE_STREAMING:
|
||||
update_latency(s->impl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue