summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-27 16:20:38 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-27 16:20:38 +0000
commitc63a673ffee23c350e7cdfe61e0488b846790111 (patch)
treee49b478d5d9c18606e0e81ddeac75ababc678664
parent7434d1425de6b5dd747d094ec6fd4efb62dfed75 (diff)
update for polypaudio 0.3
git-svn-id: file:///home/lennart/svn/public/paman/trunk@23 cdefa82f-4ce1-0310-97f5-ab6066f37c3c
-rw-r--r--configure.ac4
-rw-r--r--src/MainWindow.cc5
-rw-r--r--src/Makefile.am3
-rw-r--r--src/ServerInfoManager.cc6
-rw-r--r--src/ServerInfoManager.hh8
-rw-r--r--src/SinkInputWindow.cc6
6 files changed, 19 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index d8837ac..d3420af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
AC_PREREQ(2.57)
-AC_INIT([paman],[0.1],[mzcnzna (at) 0pointer (dot) de])
+AC_INIT([paman],[0.2],[mzcnzna (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([src/paman.cc])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign -Wall])
@@ -48,7 +48,7 @@ if test -d ../polypaudio ; then
POLYP_LIBS='-L$(top_srcdir)/../polypaudio/polyp/.libs -lpolyp -lpolyp-mainloop-glib -lpolyp-mainloop-glib -lpolyp-error'
echo "*** Found polypaudio in ../polypaudio, using that version ***"
else
- PKG_CHECK_MODULES(POLYP, [ polyplib polyplib-mainloop polyplib-glib-mainloop polyplib-error ])
+ PKG_CHECK_MODULES(POLYP, [ polyplib >= 0.3 polyplib-glib-mainloop >= 0.3 ])
fi
AC_SUBST(POLYP_LIBS)
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index 6e2dbe2..7ae0987 100644
--- a/src/MainWindow.cc
+++ b/src/MainWindow.cc
@@ -193,6 +193,7 @@ void MainWindow::updateInfo(ModuleInfo &i) {
}
void MainWindow::updateInfo(SinkInputInfo &i) {
+ char t[256];
if (!i.treeRef) {
SinkInfo *si = serverInfoManager->getSinkInfo(i.sink);
if (!si)
@@ -203,7 +204,9 @@ void MainWindow::updateInfo(SinkInputInfo &i) {
}
Gtk::TreeRow row = *(deviceTreeStore->get_iter(i.treeRef.get_path()));
- row[deviceTreeModelColumns.name] = i.name;
+ snprintf(t, sizeof(t), "#%i", i.index);
+ row[deviceTreeModelColumns.name] = t;
+ row[deviceTreeModelColumns.description] = i.name;
row[deviceTreeModelColumns.index] = i.index;
row[deviceTreeModelColumns.type] = ROW_TYPE_SINK_INPUT;
diff --git a/src/Makefile.am b/src/Makefile.am
index 51137a9..59cc743 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,4 +16,5 @@ paman_SOURCES=MainWindow.cc MainWindow.hh \
SampleWindow.cc SampleWindow.hh
paman_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(POLYP_LIBS)
-paman_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(POLYP_CFLAGS) -DGLADE_FILE=\"$(pkgdatadir)/paman.glade\"
+paman_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(POLYP_CFLAGS)
+#-DGLADE_FILE=\"$(pkgdatadir)/paman.glade\"
diff --git a/src/ServerInfoManager.cc b/src/ServerInfoManager.cc
index bd16938..55a3f3f 100644
--- a/src/ServerInfoManager.cc
+++ b/src/ServerInfoManager.cc
@@ -167,7 +167,8 @@ SinkInputInfo::SinkInputInfo(const struct pa_sink_input_info &i) :
client(i.client),
owner_module(i.owner_module),
volume(i.volume),
- latency(i.latency),
+ buffer_usec(i.buffer_usec),
+ sink_usec(i.sink_usec),
window(NULL) {
}
@@ -184,7 +185,8 @@ void SinkInputInfo::update(const struct pa_sink_input_info &i) {
client = i.client;
owner_module = i.owner_module;
volume = i.volume;
- latency = i.latency;
+ buffer_usec = i.buffer_usec;
+ sink_usec = i.buffer_usec;
if (window)
window->updateInfo(*this);
diff --git a/src/ServerInfoManager.hh b/src/ServerInfoManager.hh
index 6fa8342..6762f75 100644
--- a/src/ServerInfoManager.hh
+++ b/src/ServerInfoManager.hh
@@ -39,8 +39,8 @@ public:
struct pa_sample_spec sample_spec;
uint32_t monitor_source;
uint32_t owner_module;
- uint32_t volume;
- uint32_t latency;
+ pa_volume_t volume;
+ pa_usec_t latency;
Gtk::TreeRowReference treeRef, sinkComboBoxTreeRef;
@@ -113,8 +113,8 @@ public:
uint32_t sink;
uint32_t client;
uint32_t owner_module;
- uint32_t volume;
- uint32_t latency;
+ pa_volume_t volume;
+ pa_usec_t buffer_usec, sink_usec;
Gtk::TreeRowReference treeRef;
diff --git a/src/SinkInputWindow.cc b/src/SinkInputWindow.cc
index eec7efa..e78b567 100644
--- a/src/SinkInputWindow.cc
+++ b/src/SinkInputWindow.cc
@@ -56,7 +56,7 @@ SinkInputWindow* SinkInputWindow::create() {
}
void SinkInputWindow::updateInfo(const SinkInputInfo &i) {
- char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH];
+ char t[80], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH];
nameLabel->set_text(i.name);
snprintf(t, sizeof(t), "#%u", i.index);
@@ -71,8 +71,8 @@ void SinkInputWindow::updateInfo(const SinkInputInfo &i) {
ownerModuleLabel->set_text(t);
}
- snprintf(t, sizeof(t), "%u usec", i.latency);
- latencyLabel->set_text(t);
+ snprintf(t, sizeof(t), "%u &#956;s (= buffer: %u &#956;s + sink: %u &#956;s)", i.buffer_usec+i.sink_usec, i.buffer_usec, i.sink_usec);
+ latencyLabel->set_markup(t);
SinkInfo *sink = serverInfoManager->getSinkInfo(i.sink);
sinkLabel->set_text(sink->name);