50 double const nframes = _latency_gui->adjustment.get_value();
53 if (nframes < (_latency_gui->sample_rate / 1000.0)) {
57 s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) <<
" ms";
65 initial_value (_latent.user_latency()),
70 adjustment (initial_value, 0.0, sample_rate, 1.0, sample_rate / 1000.0
f),
71 bc (adjustment, this),
72 reset_button (
_(
"Reset"))
83 w = manage (
new Image (Stock::ADD, ICON_SIZE_BUTTON));
86 w = manage (
new Image (Stock::REMOVE, ICON_SIZE_BUTTON));
90 hbox1.pack_start (
bc,
true,
true);
92 hbox2.set_homogeneous (
false);
93 hbox2.set_spacing (12);
105 bc.set_size_request (-1, 25);
106 bc.set_name (
X_(
"ProcessorControlSlider"));
109 pack_start (
hbox1,
true,
true);
110 pack_start (
hbox2,
true,
true);
139 std::string unitstr =
units_combo.get_active_text();
149 fatal <<
string_compose (
_(
"programming error: %1 (%2)"),
X_(
"illegal string in latency GUI units combo"), unitstr)
165 get_vbox()->pack_start (
lwidget);
166 add_button (Stock::CLOSE, RESPONSE_CLOSE);
LIBPBD_API Transmitter fatal
LatencyGUI(ARDOUR::Latent &, framepos_t sample_rate, framepos_t period_size)
std::ostream & endmsg(std::ostream &ostr)
LIBGTKMM2EXT_API void set_popdown_strings(Gtk::ComboBoxText &, const std::vector< std::string > &)
#define P_(Singular, Plural, HowMany)
virtual framecnt_t signal_latency() const =0
std::string get_label(double &)
LIBARDOUR_API PBD::PropertyDescriptor< float > shift
Gtk::ComboBoxText units_combo
virtual void set_user_latency(framecnt_t val)
static const gchar * _unit_strings[]
void change_latency_from_button(int dir)
static std::vector< std::string > unit_strings
Gtk::Adjustment adjustment
std::string string_compose(const std::string &fmt, const T1 &o1)
LatencyDialog(const std::string &title, ARDOUR::Latent &, framepos_t sample_rate, framepos_t period_size)