using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
-using namespace sigc;
using namespace ARDOUR;
std::vector<std::string> LatencyGUI::unit_strings;
std::string
-LatencyGUI::get_label (int&)
+LatencyBarController::get_label (int&)
{
- double const nframes = adjustment.get_value();
+ double const nframes = _latency_gui->adjustment.get_value();
std::stringstream s;
- if (nframes < (sample_rate / 1000.0)) {
+ if (nframes < (_latency_gui->sample_rate / 1000.0)) {
s << ((nframes64_t) rint (nframes)) << " samples";
} else {
- s << std::fixed << std::setprecision (2) << (nframes / (sample_rate / 1000.0)) << " msecs";
+ s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) << " msecs";
}
-
+
return s.str ();
}
ignored (new PBD::IgnorableControllable()),
/* max 1 second, step by frames, page by msecs */
adjustment (initial_value, 0.0, sample_rate, 1.0, sample_rate / 1000.0f),
- bc (adjustment, ignored),
+ bc (adjustment, this),
reset_button (_("Reset"))
{
Widget* w;
unit_strings = I18N (_unit_strings);
}
- set_popdown_strings (units_combo, unit_strings);
+ set_popdown_strings (units_combo, unit_strings);
units_combo.set_active_text (unit_strings.front());
w = manage (new Image (Stock::ADD, ICON_SIZE_BUTTON));
hbox2.pack_start (plus_button);
hbox2.pack_start (units_combo, true, true);
- minus_button.signal_clicked().connect (bind (mem_fun (*this, &LatencyGUI::change_latency_from_button), -1));
- plus_button.signal_clicked().connect (bind (mem_fun (*this, &LatencyGUI::change_latency_from_button), 1));
- reset_button.signal_clicked().connect (mem_fun (*this, &LatencyGUI::reset));
+ minus_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LatencyGUI::change_latency_from_button), -1));
+ plus_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LatencyGUI::change_latency_from_button), 1));
+ reset_button.signal_clicked().connect (sigc::mem_fun (*this, &LatencyGUI::reset));
- adjustment.signal_value_changed().connect (mem_fun (*this, &LatencyGUI::finish));
+ adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &LatencyGUI::finish));
bc.set_size_request (-1, 25);
bc.set_style (BarController::LeftToRight);
: ArdourDialog (title, false, true),
lwidget (l, sr, psz)
{
-
+
get_vbox()->pack_start (lwidget);
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::APPLY, RESPONSE_REJECT);
add_button (Stock::OK, RESPONSE_ACCEPT);
show_all ();
-
+
while (true) {
int ret = run ();