From 0a84f669d3d4c72c498b01b999dd89af7f917480 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 16 Sep 2004 00:02:32 +0000 Subject: update to new API show source and source_output latencies ad kill buttons to client/sink_input/source_output (incomplete) add vumeter buttons to sink/source git-svn-id: file:///home/lennart/svn/public/paman/trunk@33 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- src/SourceOutputWindow.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/SourceOutputWindow.cc') diff --git a/src/SourceOutputWindow.cc b/src/SourceOutputWindow.cc index 30808f3..e93dff4 100644 --- a/src/SourceOutputWindow.cc +++ b/src/SourceOutputWindow.cc @@ -13,10 +13,12 @@ SourceOutputWindow::SourceOutputWindow(BaseObjectType* cobject, const Glib::RefP sourceLabel(NULL), clientLabel(NULL), ownerModuleLabel(NULL), + latencyLabel(NULL), closeButton(NULL), toOwnerModuleButton(NULL), toClientButton(NULL), - toSourceButton(NULL) { + toSourceButton(NULL), + killButton(NULL) { refGlade->get_widget("nameLabel", nameLabel); refGlade->get_widget("indexLabel", indexLabel); @@ -24,10 +26,12 @@ SourceOutputWindow::SourceOutputWindow(BaseObjectType* cobject, const Glib::RefP refGlade->get_widget("sourceLabel", sourceLabel); refGlade->get_widget("clientLabel", clientLabel); refGlade->get_widget("ownerModuleLabel", ownerModuleLabel); + refGlade->get_widget("latencyLabel", latencyLabel); refGlade->get_widget("closeButton", closeButton); refGlade->get_widget("toOwnerModuleButton", toOwnerModuleButton); refGlade->get_widget("toClientButton", toClientButton); refGlade->get_widget("toSourceButton", toSourceButton); + refGlade->get_widget("killButton", killButton); closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onCloseButton)); toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onToOwnerModuleButton)); @@ -43,7 +47,7 @@ SourceOutputWindow* SourceOutputWindow::create() { } void SourceOutputWindow::updateInfo(const SourceOutputInfo &i) { - char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + char t[100], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; nameLabel->set_text(i.name); snprintf(t, sizeof(t), "#%u", i.index); @@ -58,6 +62,9 @@ void SourceOutputWindow::updateInfo(const SourceOutputInfo &i) { ownerModuleLabel->set_text(t); } + snprintf(t, sizeof(t), "%0.0f μs (= buffer: %0.0f μs + source: %0.0f μs)", (double) i.buffer_usec+i.source_usec, (double) i.buffer_usec, (double) i.source_usec); + latencyLabel->set_markup(t); + SourceInfo *source = serverInfoManager->getSourceInfo(i.source); sourceLabel->set_text(source->name); @@ -97,7 +104,7 @@ void SourceOutputWindow::onToSourceButton() { serverInfoManager->showSourceWindow(source); } -bool SourceOutputWindow::on_delete_event(GdkEventAny* e) { +bool SourceOutputWindow::on_delete_event(GdkEventAny*) { hide(); return false; } -- cgit