summaryrefslogtreecommitdiffstats
path: root/src/SourceOutputWindow.cc
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-16 00:02:32 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-16 00:02:32 +0000
commit0a84f669d3d4c72c498b01b999dd89af7f917480 (patch)
tree77960fce506b9297682ef79be9274467f595bf8a /src/SourceOutputWindow.cc
parentae4653849a9a5990caf84d5ecd1466435760dd60 (diff)
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
Diffstat (limited to 'src/SourceOutputWindow.cc')
-rw-r--r--src/SourceOutputWindow.cc13
1 files changed, 10 insertions, 3 deletions
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 &#956;s (= buffer: %0.0f &#956;s + source: %0.0f &#956;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;
}