mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
struct impl *this = object;
|
||||
|
|
@ -1372,7 +1380,10 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
this->started = true;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
SPA_FALLTHROUGH;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
reset_node(this);
|
||||
SPA_FALLTHROUGH;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue