[pulseaudio-discuss] [PATCH] sink-input: Keep reference ratio up-to-date

Tanu Kaskinen tanuk at iki.fi
Tue Jul 9 07:43:09 PDT 2013


On Wed, 2013-04-03 at 18:28 +0300, Tanu Kaskinen wrote:
> The reference ratio should always be kept up-to-date. If the reference
> ratio is not updated when the input volume changes, the stale
> reference ratio ends up being used as the new input volume when the
> input is moved.
> ---
>  src/pulsecore/sink-input.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
> index 6131bd3..db52692 100644
> --- a/src/pulsecore/sink-input.c
> +++ b/src/pulsecore/sink-input.c
> @@ -1267,6 +1267,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, pa_boo
>          /* OK, we are in normal volume mode. The volume only affects
>           * ourselves */
>          set_real_ratio(i, volume);
> +        i->reference_ratio = i->volume;
>  
>          /* Copy the new soft_volume to the thread_info struct */
>          pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0);

No feedback received, I now pushed this patch.

-- 
Tanu



More information about the pulseaudio-discuss mailing list