summaryrefslogtreecommitdiffstats
path: root/src/Patchage.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-15 07:51:11 +0000
committerDavid Robillard <d@drobilla.net>2010-12-15 07:51:11 +0000
commit7d4e3fc0f17c72e94a1be2fae03d8a5b5af0ef7a (patch)
treeba574ebd53f3a11023e8107ff6c956305ad8fb8e /src/Patchage.cpp
parentb90779815568c7c6583a637d7e19d12fe4b7307b (diff)
downloadpatchage-7d4e3fc0f17c72e94a1be2fae03d8a5b5af0ef7a.tar.gz
patchage-7d4e3fc0f17c72e94a1be2fae03d8a5b5af0ef7a.tar.bz2
patchage-7d4e3fc0f17c72e94a1be2fae03d8a5b5af0ef7a.zip
Reduce polling frequency of Jack X-Run information.
Clean up code, remove cruft. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2707 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r--src/Patchage.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index 1db04ea..48f69ae 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -373,7 +373,13 @@ Patchage::idle_callback()
_driver_detached = false;
flush_resize();
- update_load();
+
+ // Update load every 10 idle callbacks
+ static int count = 0;
+ if (++count == 10) {
+ update_load();
+ count = 0;
+ }
return true;
}
@@ -400,7 +406,7 @@ Patchage::update_load()
return true;
char tmp_buf[8];
- snprintf(tmp_buf, 8, "%zd", _jack_driver->xruns());
+ snprintf(tmp_buf, 8, "%zd", _jack_driver->get_xruns());
_main_xrun_progress->set_text(string(tmp_buf) + " Dropouts");