From b0f49e543d5f849bd128aecb7173a484b9748af9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Jun 2011 02:15:46 +0000 Subject: Don't include unused DBus.hpp for Jack+DBus. Tolerate cracked out Jack+DBus driver not setting sample rate. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3349 a436a847-0d15-0410-975c-d299462d15a1 --- src/Patchage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 576b32c..4355262 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -52,7 +52,7 @@ #ifdef HAVE_ALSA #include "AlsaDriver.hpp" #endif -#if defined(HAVE_LASH) || defined(HAVE_JACK_DBUS) +#ifdef HAVE_LASH #include "DBus.hpp" #endif #ifdef HAVE_LASH @@ -391,7 +391,8 @@ Patchage::update_statusbar() _sample_rate_label->set_text(ss.str()); ss.str(""); - ss << buffer_size * 1000 / sample_rate; + if (sample_rate != 0) + ss << buffer_size * 1000 / sample_rate; _latency_ms_label->set_text(ss.str()); _enable_refresh = true; -- cgit v1.2.1