mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-03 01:40:46 -05:00
sink: Remove input_to_master variable from sink structure
The variable is now unused.
This commit is contained in:
parent
668a22e902
commit
ed4074ae08
4 changed files with 11 additions and 39 deletions
|
|
@ -286,7 +286,6 @@ pa_sink* pa_sink_new(
|
|||
|
||||
s->inputs = pa_idxset_new(NULL, NULL);
|
||||
s->n_corked = 0;
|
||||
s->input_to_master = NULL;
|
||||
s->vsink = NULL;
|
||||
|
||||
s->reference_volume = s->real_volume = data->volume;
|
||||
|
|
@ -1693,19 +1692,11 @@ bool pa_sink_has_filter_attached(pa_sink *s) {
|
|||
pa_sink *pa_sink_get_master(pa_sink *s) {
|
||||
pa_sink_assert_ref(s);
|
||||
|
||||
/* During consolidation, we have to support s->input_to_master and
|
||||
* s->vsink->input_to_master. The first will disappear after all
|
||||
* virtual sinks use the new code. */
|
||||
while (s && (s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER)) {
|
||||
if (PA_UNLIKELY(s->vsink && !s->vsink->input_to_master))
|
||||
return NULL;
|
||||
if (PA_UNLIKELY(!s->vsink && !s->input_to_master))
|
||||
if (PA_UNLIKELY(!s->vsink || (s->vsink && !s->vsink->input_to_master)))
|
||||
return NULL;
|
||||
|
||||
if (s->input_to_master)
|
||||
s = s->input_to_master->sink;
|
||||
else
|
||||
s = s->vsink->input_to_master->sink;
|
||||
s = s->vsink->input_to_master->sink;
|
||||
}
|
||||
|
||||
return s;
|
||||
|
|
@ -1715,7 +1706,7 @@ pa_sink *pa_sink_get_master(pa_sink *s) {
|
|||
bool pa_sink_is_filter(pa_sink *s) {
|
||||
pa_sink_assert_ref(s);
|
||||
|
||||
return ((s->vsink != NULL) || (s->input_to_master != NULL));
|
||||
return ((s->vsink != NULL) && (s->vsink->input_to_master != NULL));
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue