From 03862cd31e9026e6f86619b467b3d65d527e1f6a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 20 Nov 2004 21:22:59 +0000 Subject: show resample methods git-svn-id: file:///home/lennart/svn/public/paman/trunk@43 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- src/ServerInfoManager.cc | 4 ++ src/ServerInfoManager.hh | 2 + src/SinkInputWindow.cc | 4 ++ src/SinkInputWindow.hh | 3 +- src/SourceOutputWindow.cc | 4 ++ src/SourceOutputWindow.hh | 3 +- src/paman.glade | 150 ++++++++++++++++++++++++++++++++++++++-------- 7 files changed, 142 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/ServerInfoManager.cc b/src/ServerInfoManager.cc index e05b401..adb91b2 100644 --- a/src/ServerInfoManager.cc +++ b/src/ServerInfoManager.cc @@ -182,6 +182,7 @@ SinkInputInfo::SinkInputInfo(const struct pa_sink_input_info &i) : volume(i.volume), buffer_usec(i.buffer_usec), sink_usec(i.sink_usec), + resample_method(i.resample_method ? i.resample_method : "n/a"), window(NULL) { } @@ -200,6 +201,7 @@ void SinkInputInfo::update(const struct pa_sink_input_info &i) { volume = i.volume; buffer_usec = i.buffer_usec; sink_usec = i.sink_usec; + resample_method = i.resample_method ? i.resample_method : "n/a"; if (window) window->updateInfo(*this); @@ -226,6 +228,7 @@ SourceOutputInfo::SourceOutputInfo(const struct pa_source_output_info &i) : owner_module(i.owner_module), buffer_usec(i.buffer_usec), source_usec(i.source_usec), + resample_method(i.resample_method ? i.resample_method : "n/a"), window(NULL) { } @@ -243,6 +246,7 @@ void SourceOutputInfo::update(const struct pa_source_output_info &i) { owner_module = i.owner_module; buffer_usec = i.buffer_usec; source_usec = i.source_usec; + resample_method = i.resample_method ? i.resample_method : "n/a"; if (window) window->updateInfo(*this); diff --git a/src/ServerInfoManager.hh b/src/ServerInfoManager.hh index a3f0aaf..bdce711 100644 --- a/src/ServerInfoManager.hh +++ b/src/ServerInfoManager.hh @@ -117,6 +117,7 @@ public: uint32_t owner_module; pa_volume_t volume; pa_usec_t buffer_usec, sink_usec; + Glib::ustring resample_method; Gtk::TreeRowReference treeRef; @@ -139,6 +140,7 @@ public: uint32_t client; uint32_t owner_module; pa_usec_t buffer_usec, source_usec; + Glib::ustring resample_method; Gtk::TreeRowReference treeRef; diff --git a/src/SinkInputWindow.cc b/src/SinkInputWindow.cc index 1cf7476..5b2365d 100644 --- a/src/SinkInputWindow.cc +++ b/src/SinkInputWindow.cc @@ -15,6 +15,7 @@ SinkInputWindow::SinkInputWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("volumeResetButton", volumeResetButton); refGlade->get_widget("volumeMuteButton", volumeMuteButton); refGlade->get_widget("killButton", killButton); + refGlade->get_widget("resampleMethodLabel", resampleMethodLabel); closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onCloseButton)); toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onToOwnerModuleButton)); @@ -96,6 +98,8 @@ void SinkInputWindow::updateInfo(const SinkInputInfo &i) { else snprintf(t, sizeof(t), "%0.0f%% (-∞dB)", percent); volumeLabel->set_markup(t); + + resampleMethodLabel->set_markup(i.resample_method); set_title("Sink Input: "+i.name); diff --git a/src/SinkInputWindow.hh b/src/SinkInputWindow.hh index 01ef7b8..fd78fd2 100644 --- a/src/SinkInputWindow.hh +++ b/src/SinkInputWindow.hh @@ -20,7 +20,8 @@ public: *sinkLabel, *clientLabel, *ownerModuleLabel, - *volumeLabel; + *volumeLabel, + *resampleMethodLabel; Gtk::Button *closeButton, *toOwnerModuleButton, diff --git a/src/SourceOutputWindow.cc b/src/SourceOutputWindow.cc index fde5c0e..68d43d9 100644 --- a/src/SourceOutputWindow.cc +++ b/src/SourceOutputWindow.cc @@ -14,6 +14,7 @@ SourceOutputWindow::SourceOutputWindow(BaseObjectType* cobject, const Glib::RefP clientLabel(NULL), ownerModuleLabel(NULL), latencyLabel(NULL), + resampleMethodLabel(NULL), closeButton(NULL), toOwnerModuleButton(NULL), toClientButton(NULL), @@ -32,6 +33,7 @@ SourceOutputWindow::SourceOutputWindow(BaseObjectType* cobject, const Glib::RefP refGlade->get_widget("toClientButton", toClientButton); refGlade->get_widget("toSourceButton", toSourceButton); refGlade->get_widget("killButton", killButton); + refGlade->get_widget("resampleMethodLabel", resampleMethodLabel); closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onCloseButton)); toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onToOwnerModuleButton)); @@ -76,6 +78,8 @@ void SourceOutputWindow::updateInfo(const SourceOutputInfo &i) { clientLabel->set_text(client->name); } + resampleMethodLabel->set_markup(i.resample_method); + set_title("Source Output: "+i.name); this->source = i.source; diff --git a/src/SourceOutputWindow.hh b/src/SourceOutputWindow.hh index c474f72..f6cbc6b 100644 --- a/src/SourceOutputWindow.hh +++ b/src/SourceOutputWindow.hh @@ -19,7 +19,8 @@ public: *sourceLabel, *clientLabel, *ownerModuleLabel, - *latencyLabel; + *latencyLabel, + *resampleMethodLabel; Gtk::Button *closeButton, *toOwnerModuleButton, diff --git a/src/paman.glade b/src/paman.glade index a50e572..881884f 100644 --- a/src/paman.glade +++ b/src/paman.glade @@ -3572,7 +3572,7 @@ True - 8 + 9 2 False 6 @@ -3794,30 +3794,6 @@ - - - True - <b>Volume:</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - - - 0 - 1 - 7 - 8 - fill - - - - True @@ -3943,6 +3919,30 @@ + + + True + <b>Volume:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 8 + 9 + fill + + + + True @@ -4025,6 +4025,55 @@ + + 1 + 2 + 8 + 9 + fill + + + + + + + True + <b>Resample Method:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 7 + 8 + fill + + + + + + + True + True + label4834 + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + 1 2 @@ -4224,7 +4273,7 @@ True - 7 + 8 2 False 6 @@ -4570,6 +4619,55 @@ + + + + True + <b>Resample Method:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 7 + 8 + fill + + + + + + + True + True + label4836 + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 7 + 8 + fill + + + 0 -- cgit