Revert "ramping: minor cleanups"

This reverts commit f202af17b7.

(part of a patch series removing all ramping code)
This commit is contained in:
Arun Raghavan 2011-02-27 23:02:03 +05:30
parent 8745eccb45
commit 4cf12b91a4

View file

@ -2040,7 +2040,6 @@ void pa_sink_input_set_volume_with_ramping(pa_sink_input *i, const pa_cvolume *v
else else
volume = pa_sw_cvolume_multiply_scalar(&v, &v, pa_cvolume_max(volume)); volume = pa_sw_cvolume_multiply_scalar(&v, &v, pa_cvolume_max(volume));
} else { } else {
if (!pa_cvolume_compatible(volume, &i->sample_spec)) { if (!pa_cvolume_compatible(volume, &i->sample_spec)) {
v = i->volume; v = i->volume;
volume = pa_cvolume_scale(&v, pa_cvolume_max(volume)); volume = pa_cvolume_scale(&v, pa_cvolume_max(volume));
@ -2095,18 +2094,15 @@ void pa_sink_input_set_volume_with_ramping(pa_sink_input *i, const pa_cvolume *v
void pa_sink_input_set_mute_with_ramping(pa_sink_input *i, pa_bool_t mute, pa_bool_t save, pa_usec_t t){ void pa_sink_input_set_mute_with_ramping(pa_sink_input *i, pa_bool_t mute, pa_bool_t save, pa_usec_t t){
pa_assert(i);
pa_sink_input_assert_ref(i); pa_sink_input_assert_ref(i);
pa_assert_ctl_context();
pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
if (!i->muted == !mute) { if (!i->muted == !mute)
i->save_muted = i->save_muted || mute;
return; return;
}
i->muted = mute; i->muted = mute;
i->save_muted = save; i->save_muted = save;
/* Set this flag before the following code modify i->thread_info.muted, otherwise distortion will be heard */ /* Set this flag before the following code modify i->thread_info.muted, otherwise distortion will be heard */
if (t > 0) if (t > 0)
pa_atomic_store(&i->before_ramping_m, 1); pa_atomic_store(&i->before_ramping_m, 1);
@ -2116,9 +2112,5 @@ void pa_sink_input_set_mute_with_ramping(pa_sink_input *i, pa_bool_t mute, pa_bo
if (t > 0) if (t > 0)
sink_input_set_ramping_info_for_mute(i, mute, t); sink_input_set_ramping_info_for_mute(i, mute, t);
/* The mute status changed, let's tell people so */
if (i->mute_changed)
i->mute_changed(i);
pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index); pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
} }