audioadapter: fix switch between master and slave

When we get worken up with a callback, mark ourselves as a master
because we then need to avoid running the converter again in the
process callback. After we perform the process callback, unmark
ourself as master and wait for the next cycle.

This fixes switch from master to slave for sources.
This commit is contained in:
Wim Taymans 2019-10-18 21:45:24 +02:00
parent 2758a4555f
commit 566640a21b

View file

@ -851,8 +851,9 @@ static int impl_node_process(void *object)
if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) { if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) {
if (this->use_converter) if (this->use_converter)
status = spa_node_process(this->convert); status = spa_node_process(this->convert);
this->master = false;
} }
this->master = false;
return status; return status;
} }