SendProcessorEntry::SendProcessorEntry (boost::shared_ptr<Send> s, Width w)
: ProcessorEntry (s, w),
_send (s),
- /* set the adjustment to a gain of 0dB so that the fader's default value is right */
- _adjustment (0.781787, 0, 1, 0.01, 0.1),
+ _adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0, 1, 0.01, 0.1),
_fader (_slider, &_adjustment, 0, false),
_ignore_gain_change (false)
{
void
SendProcessorEntry::show_gain ()
{
- ENSURE_GUI_THREAD (*this, &SendProcessorEntry::show_gain)
-
- float const value = gain_to_slider_position (_send->amp()->gain ());
+ float const value = gain_to_slider_position_with_max (_send->amp()->gain (), Config->get_max_gain());
if (_adjustment.get_value() != value) {
_ignore_gain_change = true;
return;
}
- _send->amp()->set_gain (slider_position_to_gain (_adjustment.get_value()), this);
+ _send->amp()->set_gain (slider_position_to_gain_with_max (_adjustment.get_value(), Config->get_max_gain()), this);
}
void
processor = child->processor ();
}
- int ret = false;
-
if (processor && Keyboard::is_delete_event (ev)) {
Glib::signal_idle().connect (sigc::bind (
sigc::mem_fun(*this, &ProcessorBox::idle_delete_processor),
boost::weak_ptr<Processor>(processor)));
- ret = true;
} else if (Keyboard::is_context_menu_event (ev)) {
}
show_processor_menu (ev->time);
- ret = true;
} else if (processor && Keyboard::is_button2_event (ev)
#ifndef GTKOSX
} else {
processor->activate ();
}
- ret = true;
-
}
return false;