[pulseaudio-discuss] [PATCH] sink: Don't send unnecessary PA_SINK_MESSAGE_SET_VOLUME_SYNCED messages.
Colin Guthrie
gmane at colin.guthr.ie
Sun Feb 27 06:15:09 PST 2011
'Twas brillig, and Tanu Kaskinen at 27/02/11 11:20 did gyre and gimble:
> If send_msg is false, the message will be sent by the caller.
> ---
> src/pulsecore/sink.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
> index 0de544c..ba7e599 100644
> --- a/src/pulsecore/sink.c
> +++ b/src/pulsecore/sink.c
> @@ -1495,8 +1495,6 @@ void pa_sink_set_volume(
> pa_cvolume_reset(&s->soft_volume, s->sample_spec.channels);
> if (!(s->flags & PA_SINK_SYNC_VOLUME))
> s->set_volume(s);
> - else
> - send_msg = TRUE;
>
> } else
> /* If we have no function set_volume(), then the soft volume
This doesn't apply cleanly on top of your volume sharing patch...
I presume the below diff is OK?
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index d713be1..4da36f3 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1705,8 +1705,6 @@ void pa_sink_set_volume(
pa_cvolume_reset(&root_sink->soft_volume,
root_sink->sample_spec.channels);
if (!(root_sink->flags & PA_SINK_SYNC_VOLUME))
root_sink->set_volume(root_sink);
- else
- send_msg = TRUE;
} else
/* If we have no function set_volume(), then the soft volume
It's in my tree now, but perhaps more tweakage needed?
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list