summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Patchage.cpp18
-rw-r--r--src/Patchage.h4
-rw-r--r--src/patchage.glade30
3 files changed, 31 insertions, 21 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index 4cf16d5..f60bdef 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -15,6 +15,7 @@
*/
#include <cmath>
+#include <sstream>
#include "Patchage.h"
#include "PatchageEvent.h"
#include "config.h"
@@ -167,13 +168,13 @@ Patchage::Patchage(int argc, char** argv)
xml->get_widget("main_jack_connect_toggle", m_jack_connect_toggle);
xml->get_widget("main_jack_realtime_check", m_jack_realtime_check);
xml->get_widget("main_buffer_size_combo", m_buffer_size_combo);
- xml->get_widget("main_sample_rate_combo", m_sample_rate_combo);
+ xml->get_widget("main_sample_rate_label", m_sample_rate_label);
xml->get_widget("main_xrun_progress", m_xrun_progress_bar);
xml->get_widget("main_xrun_counter", m_xrun_counter);
xml->get_widget("main_clear_load_button", m_clear_load_button);
gtkmm_set_width_for_given_text(*m_buffer_size_combo, "4096", 40);
- gtkmm_set_width_for_given_text(*m_sample_rate_combo, "44.1", 40);
+ //gtkmm_set_width_for_given_text(*m_sample_rate_combo, "44.1", 40);
m_canvas_scrolledwindow->add(*m_canvas);
//m_canvas_scrolledwindow->signal_event().connect(sigc::mem_fun(m_canvas, &FlowCanvas::scroll_event_handler));
@@ -185,7 +186,7 @@ Patchage::Patchage(int argc, char** argv)
m_jack_connect_toggle->signal_toggled().connect(sigc::mem_fun(this, &Patchage::jack_connect_changed));
m_buffer_size_combo->signal_changed().connect(sigc::mem_fun(this, &Patchage::buffer_size_changed));
- m_sample_rate_combo->signal_changed().connect(sigc::mem_fun(this, &Patchage::sample_rate_changed));
+ //m_sample_rate_combo->signal_changed().connect(sigc::mem_fun(this, &Patchage::sample_rate_changed));
m_jack_realtime_check->signal_toggled().connect(sigc::mem_fun(this, &Patchage::realtime_changed));
m_rewind_button->signal_clicked().connect(sigc::mem_fun(m_jack_driver, &JackDriver::rewind_transport));
@@ -341,7 +342,7 @@ Patchage::update_toolbar()
if (m_jack_driver->is_attached()) {
m_buffer_size_combo->set_active((int)log2f(m_jack_driver->buffer_size()) - 5);
- switch ((int)m_jack_driver->sample_rate()) {
+ /*switch ((int)m_jack_driver->sample_rate()) {
case 44100:
m_sample_rate_combo->set_active(0);
break;
@@ -355,7 +356,10 @@ Patchage::update_toolbar()
m_sample_rate_combo->set_active(-1);
status_message("[JACK] ERROR: Unknown sample rate");
break;
- }
+ }*/
+ stringstream srate;
+ srate << m_jack_driver->sample_rate()/1000.0;
+ m_sample_rate_label->set_text(srate.str());
}
}
@@ -690,7 +694,6 @@ Patchage::store_window_location()
void
Patchage::clear_load()
{
- cerr << "CLEAR LOAD\n";
m_xrun_progress_bar->set_fraction(0.0);
m_jack_driver->reset_xruns();
m_jack_driver->reset_delay();
@@ -714,6 +717,7 @@ Patchage::buffer_size_changed()
}
+/*
void
Patchage::sample_rate_changed()
{
@@ -733,7 +737,7 @@ Patchage::sample_rate_changed()
//m_jack_driver->set_sample_rate(rate);
}
}
-
+*/
void
Patchage::realtime_changed()
diff --git a/src/Patchage.h b/src/Patchage.h
index 5c23dff..846f74f 100644
--- a/src/Patchage.h
+++ b/src/Patchage.h
@@ -80,7 +80,7 @@ protected:
void jack_connect_changed();
void buffer_size_changed();
- void sample_rate_changed();
+ //void sample_rate_changed();
void realtime_changed();
void on_pane_position_changed();
@@ -150,7 +150,7 @@ protected:
Gtk::ToggleButton* m_jack_connect_toggle;
Gtk::ToggleButton* m_jack_realtime_check;
Gtk::ComboBox* m_buffer_size_combo;
- Gtk::ComboBox* m_sample_rate_combo;
+ Gtk::Label* m_sample_rate_label;
Gtk::ProgressBar* m_xrun_progress_bar;
Gtk::Entry* m_xrun_counter;
Gtk::Button* m_clear_load_button;
diff --git a/src/patchage.glade b/src/patchage.glade
index 48e9220..b4f815a 100644
--- a/src/patchage.glade
+++ b/src/patchage.glade
@@ -638,7 +638,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label7">
+ <widget class="GtkLabel" id="main_frames_at_label">
<property name="visible">True</property>
<property name="label" translatable="yes">frames @</property>
<property name="use_underline">False</property>
@@ -663,21 +663,27 @@
</child>
<child>
- <widget class="GtkComboBoxEntry" id="main_sample_rate_combo">
- <property name="border_width">2</property>
+ <widget class="GtkLabel" id="main_sample_rate_label">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="items" translatable="yes">44.1
-48
-96</property>
- <property name="add_tearoffs">False</property>
- <property name="has_frame">True</property>
- <property name="focus_on_click">True</property>
+ <property name="label" translatable="yes">48</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
</widget>
<packing>
<property name="padding">1</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>