summaryrefslogtreecommitdiffstats
path: root/src/Patchage.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-14 04:55:22 +0000
committerDavid Robillard <d@drobilla.net>2007-01-14 04:55:22 +0000
commitf0b1962683cf24caa94f9176536a667a179cfc52 (patch)
tree7d6351ed87c33a91aab904f45f3c5cd2a1988e51 /src/Patchage.cpp
parentf9a66347152ad4459a564d5f92fdeabb6d8b4019 (diff)
downloadpatchage-f0b1962683cf24caa94f9176536a667a179cfc52.tar.gz
patchage-f0b1962683cf24caa94f9176536a667a179cfc52.tar.bz2
patchage-f0b1962683cf24caa94f9176536a667a179cfc52.zip
Replaced useless sample rate combobox with a label.
git-svn-id: http://svn.drobilla.net/lad/patchage@258 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r--src/Patchage.cpp18
1 files changed, 11 insertions, 7 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()