-#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include <iomanip>
#include "ardour/latent.h"
+#include "pbd/convert.h"
#include <gtkmm2ext/utils.h>
#include "latency_gui.h"
std::vector<std::string> LatencyGUI::unit_strings;
std::string
-LatencyBarController::get_label (int&)
+LatencyBarController::get_label (double&)
{
double const nframes = _latency_gui->adjustment.get_value();
std::stringstream s;
if (nframes < (_latency_gui->sample_rate / 1000.0)) {
- s << ((nframes64_t) rint (nframes)) << " samples";
+ s << ((framepos_t) rint (nframes)) << " samples";
} else {
s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) << " msecs";
}
return s.str ();
}
-LatencyGUI::LatencyGUI (Latent& l, nframes64_t sr, nframes64_t psz)
+LatencyGUI::LatencyGUI (Latent& l, framepos_t sr, framepos_t psz)
: _latent (l),
initial_value (_latent.signal_latency()),
sample_rate (sr),
void
LatencyGUI::finish ()
{
- nframes64_t new_value = (nframes64_t) adjustment.get_value();
+ framepos_t new_value = (framepos_t) adjustment.get_value();
if (new_value != initial_value) {
_latent.set_user_latency (new_value);
}
void
LatencyGUI::change_latency_from_button (int dir)
{
- Glib::ustring unitstr = units_combo.get_active_text();
+ std::string unitstr = units_combo.get_active_text();
double shift = 0.0;
if (unitstr == unit_strings[0]) {
}
}
-LatencyDialog::LatencyDialog (const Glib::ustring& title, Latent& l, nframes64_t sr, nframes64_t psz)
+LatencyDialog::LatencyDialog (const std::string& title, Latent& l, framepos_t sr, framepos_t psz)
: ArdourDialog (title, false, true),
lwidget (l, sr, psz)
{