summaryrefslogtreecommitdiff
path: root/gtk2_ardour/latency_gui.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-06-27 22:06:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-06-27 22:06:35 +0000
commitb5af3bb8e313e13166cc54c60a14e5492e674065 (patch)
treed27e045a17bae47e63cde89173a53fb30ffa298b /gtk2_ardour/latency_gui.h
parent34be8c21198441a4f8ceac35da12250cafa2d1c2 (diff)
allow user tweaking of everything that might have inherent latency; add GUI for track level adjustment and widget that can be (but is not yet) embedded in a plugin GUI
git-svn-id: svn://localhost/ardour2/trunk@2075 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/latency_gui.h')
-rw-r--r--gtk2_ardour/latency_gui.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/gtk2_ardour/latency_gui.h b/gtk2_ardour/latency_gui.h
new file mode 100644
index 0000000000..49f22fa266
--- /dev/null
+++ b/gtk2_ardour/latency_gui.h
@@ -0,0 +1,61 @@
+#include <vector>
+#include <string>
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/adjustment.h>
+
+#include <gtkmm2ext/barcontroller.h>
+#include <pbd/controllable.h>
+
+#include <ardour/types.h>
+
+#include "ardour_dialog.h"
+
+namespace ARDOUR {
+ class Latent;
+}
+
+class LatencyGUI : public Gtk::VBox
+{
+ public:
+ LatencyGUI (ARDOUR::Latent&, nframes64_t sample_rate, nframes64_t period_size);
+ ~LatencyGUI() { }
+
+ void finish ();
+ void reset ();
+ void refresh ();
+
+ private:
+ ARDOUR::Latent& _latent;
+ nframes64_t initial_value;
+ nframes64_t sample_rate;
+ nframes64_t period_size;
+ PBD::IgnorableControllable ignored;
+
+ Gtk::Adjustment adjustment;
+ Gtkmm2ext::BarController bc;
+ Gtk::HBox hbox1;
+ Gtk::HBox hbox2;
+ Gtk::HButtonBox hbbox;
+ Gtk::Button minus_button;
+ Gtk::Button plus_button;
+ Gtk::Button reset_button;
+ Gtk::ComboBoxText units_combo;
+
+ void change_latency_from_button (int dir);
+ void latency_printer (char* buf, unsigned int bufsize);
+
+ static std::vector<std::string> unit_strings;
+};
+
+class LatencyDialog : public ArdourDialog
+{
+ public:
+ LatencyDialog (const Glib::ustring& title, ARDOUR::Latent&, nframes64_t sample_rate, nframes64_t period_size);
+ ~LatencyDialog() {}
+
+ private:
+ LatencyGUI lwidget;
+};