diff options
author | David Robillard <d@drobilla.net> | 2011-06-03 02:15:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-03 02:15:46 +0000 |
commit | b0f49e543d5f849bd128aecb7173a484b9748af9 (patch) | |
tree | 1393658cd03d5d03b6b04fb6e290b78b7542679d | |
parent | c0478c7f4ab46104c37fa31f62db4df5482a0904 (diff) | |
download | patchage-b0f49e543d5f849bd128aecb7173a484b9748af9.tar.gz patchage-b0f49e543d5f849bd128aecb7173a484b9748af9.tar.bz2 patchage-b0f49e543d5f849bd128aecb7173a484b9748af9.zip |
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
-rw-r--r-- | src/Patchage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |