(from 2.x) make sure that F4 is bound to the real separate action, not the Separate...
[ardour.git] / gtk2_ardour / latency_gui.cc
index 849edae767dfa726499e5da887dd0b036083ca2c..d7c0be840f38cb5fea6b299d41fbbc63841bb925 100644 (file)
@@ -1,8 +1,8 @@
-#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"
@@ -25,13 +25,13 @@ static const gchar *_unit_strings[] = {
 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";
        }
@@ -39,7 +39,7 @@ LatencyBarController::get_label (int&)
        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),
@@ -94,7 +94,7 @@ LatencyGUI::LatencyGUI (Latent& l, nframes64_t sr, nframes64_t psz)
 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);
        }
@@ -117,7 +117,7 @@ LatencyGUI::refresh ()
 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]) {
@@ -139,7 +139,7 @@ LatencyGUI::change_latency_from_button (int dir)
        }
 }
 
-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)
 {