mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
examples: fix adapter control
target_rate and duration need to be configured now. Fixes #3125
This commit is contained in:
parent
d3bd687bc2
commit
7da61e2dfa
1 changed files with 4 additions and 2 deletions
|
|
@ -517,8 +517,10 @@ static int make_nodes(struct data *data, const char *device)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
/* set io position and clock on source and sink nodes */
|
/* set io position and clock on source and sink nodes */
|
||||||
data->position.clock.rate = SPA_FRACTION(1, 48000);
|
data->position.clock.target_rate = SPA_FRACTION(1, 48000);
|
||||||
data->position.clock.duration = 1024;
|
data->position.clock.target_duration = 1024;
|
||||||
|
data->position.clock.rate = data->position.clock.target_rate;
|
||||||
|
data->position.clock.duration = data->position.clock.target_duration;
|
||||||
if ((res = spa_node_set_io(data->source_node,
|
if ((res = spa_node_set_io(data->source_node,
|
||||||
SPA_IO_Position,
|
SPA_IO_Position,
|
||||||
&data->position, sizeof(data->position))) < 0) {
|
&data->position, sizeof(data->position))) < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue