mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-16 05:34:04 -04:00
audioconvert: fix the filter-graph samplerate
The filter graph runs before or after the resampler depending on the direction of the conversion.
This commit is contained in:
parent
d58d2a2375
commit
fb43eb8ee2
1 changed files with 3 additions and 3 deletions
|
|
@ -1000,13 +1000,13 @@ static int setup_filter_graph(struct impl *this, struct spa_filter_graph *graph)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
char rate_str[64];
|
char rate_str[64];
|
||||||
struct dir *in;
|
struct dir *dir;
|
||||||
|
|
||||||
if (graph == NULL)
|
if (graph == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
in = &this->dir[SPA_DIRECTION_INPUT];
|
dir = &this->dir[SPA_DIRECTION_REVERSE(this->direction)];
|
||||||
snprintf(rate_str, sizeof(rate_str), "%d", in->format.info.raw.rate);
|
snprintf(rate_str, sizeof(rate_str), "%d", dir->format.info.raw.rate);
|
||||||
|
|
||||||
spa_filter_graph_deactivate(graph);
|
spa_filter_graph_deactivate(graph);
|
||||||
res = spa_filter_graph_activate(graph,
|
res = spa_filter_graph_activate(graph,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue