mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -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;
|
||||
char rate_str[64];
|
||||
struct dir *in;
|
||||
struct dir *dir;
|
||||
|
||||
if (graph == NULL)
|
||||
return 0;
|
||||
|
||||
in = &this->dir[SPA_DIRECTION_INPUT];
|
||||
snprintf(rate_str, sizeof(rate_str), "%d", in->format.info.raw.rate);
|
||||
dir = &this->dir[SPA_DIRECTION_REVERSE(this->direction)];
|
||||
snprintf(rate_str, sizeof(rate_str), "%d", dir->format.info.raw.rate);
|
||||
|
||||
spa_filter_graph_deactivate(graph);
|
||||
res = spa_filter_graph_activate(graph,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue