mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
audioconvert2: reset node in Flush/Suspend
This commit is contained in:
parent
8e6a8a705b
commit
d3baa16559
1 changed files with 11 additions and 0 deletions
|
|
@ -1355,6 +1355,14 @@ static int setup_convert(struct impl *this)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void reset_node(struct impl *this)
|
||||||
|
{
|
||||||
|
if (this->resample.reset)
|
||||||
|
resample_reset(&this->resample);
|
||||||
|
this->in_offset = 0;
|
||||||
|
this->out_offset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int impl_node_send_command(void *object, const struct spa_command *command)
|
static int impl_node_send_command(void *object, const struct spa_command *command)
|
||||||
{
|
{
|
||||||
struct impl *this = object;
|
struct impl *this = object;
|
||||||
|
|
@ -1372,7 +1380,10 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
||||||
this->started = true;
|
this->started = true;
|
||||||
break;
|
break;
|
||||||
case SPA_NODE_COMMAND_Suspend:
|
case SPA_NODE_COMMAND_Suspend:
|
||||||
|
SPA_FALLTHROUGH;
|
||||||
case SPA_NODE_COMMAND_Flush:
|
case SPA_NODE_COMMAND_Flush:
|
||||||
|
reset_node(this);
|
||||||
|
SPA_FALLTHROUGH;
|
||||||
case SPA_NODE_COMMAND_Pause:
|
case SPA_NODE_COMMAND_Pause:
|
||||||
this->started = false;
|
this->started = false;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue