mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-02-26 01:40:25 -05:00
source: Remove output_from_master field
The only source still using the output_from_master field of the source structure was module-echo-cancel. Due to the differences between the echo-cancel source and the other virtual sources, consolidation did not seem useful. To faciliate removing the output_from_master field from the source, a dummy vsource structure was created for module-echo-cancel. After that, the output_from_master field was removed.
This commit is contained in:
parent
5d05301663
commit
664d175da8
7 changed files with 27 additions and 64 deletions
|
|
@ -1307,19 +1307,10 @@ bool pa_source_output_may_move(pa_source_output *o) {
|
|||
bool pa_source_output_is_filter_loop(pa_source_output *target, pa_source *s) {
|
||||
unsigned PA_UNUSED i = 0;
|
||||
|
||||
/* During consolidation, we have to support s->output_from_master and
|
||||
* s->vsource->output_from_master. The first will disappear after all
|
||||
* virtual sources use the new code. */
|
||||
while (s && (s->output_from_master || (s->vsource && s->vsource->output_from_master))) {
|
||||
if (s->vsource) {
|
||||
if (s->vsource->output_from_master == target)
|
||||
return true;
|
||||
s = s->vsource->output_from_master->source;
|
||||
} else {
|
||||
if (s->output_from_master == target)
|
||||
return true;
|
||||
s = s->output_from_master->source;
|
||||
}
|
||||
while (s && (s->vsource && s->vsource->output_from_master)) {
|
||||
if (s->vsource->output_from_master == target)
|
||||
return true;
|
||||
s = s->vsource->output_from_master->source;
|
||||
pa_assert(i++ < 100);
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1331,11 +1322,8 @@ static bool is_filter_source_moving(pa_source_output *o) {
|
|||
if (!source)
|
||||
return false;
|
||||
|
||||
while (source->output_from_master || (source->vsource && source->vsource->output_from_master)) {
|
||||
if (source->vsource)
|
||||
source = source->vsource->output_from_master->source;
|
||||
else
|
||||
source = source->output_from_master->source;
|
||||
while (source->vsource && source->vsource->output_from_master) {
|
||||
source = source->vsource->output_from_master->source;
|
||||
|
||||
if (!source)
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue