From 41fe8530d1c1c83e1db207dae2f0be83e7426ce9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Sep 2004 23:55:25 +0000 Subject: show size of sample cache in stat window show size in sample window git-svn-id: file:///home/lennart/svn/public/paman/trunk@28 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- src/SampleWindow.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/SampleWindow.cc') diff --git a/src/SampleWindow.cc b/src/SampleWindow.cc index b1ea149..5b254f0 100644 --- a/src/SampleWindow.cc +++ b/src/SampleWindow.cc @@ -11,6 +11,7 @@ SampleWindow::SampleWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("volumeLabel", volumeLabel); refGlade->get_widget("sampleTypeLabel", sampleTypeLabel); refGlade->get_widget("durationLabel", durationLabel); + refGlade->get_widget("sizeLabel", sizeLabel); refGlade->get_widget("closeButton", closeButton); closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SampleWindow::onCloseButton)); @@ -32,7 +34,7 @@ SampleWindow* SampleWindow::create() { } void SampleWindow::updateInfo(const SampleInfo &i) { - char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + char t[60], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; nameLabel->set_text(i.name); snprintf(t, sizeof(t), "#%u", i.index); @@ -46,6 +48,9 @@ void SampleWindow::updateInfo(const SampleInfo &i) { snprintf(t, sizeof(t), "%0.1fs", (double) i.duration/1000000); durationLabel->set_text(t); + + pa_bytes_snprint(t, sizeof(t), i.bytes); + sizeLabel->set_text(t); set_title("Sample: "+i.name); } -- cgit