summaryrefslogtreecommitdiff
path: root/drumgizmo/audiooutputenginedl.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-12 19:59:17 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-12 19:59:17 +0200
commitaa8599e808008a14ac0f7d40f91dc2e05bd3bd0a (patch)
treeb95e724eb81a407569c5a77a486e2aea3595fcd4 /drumgizmo/audiooutputenginedl.cc
parent68247258548efd9db16b2542122a980a1ff9e03d (diff)
Make engine ask output module for buffer size. Use this new feature to adapt internal buffers to buffer size reported by jack.
Diffstat (limited to 'drumgizmo/audiooutputenginedl.cc')
-rw-r--r--drumgizmo/audiooutputenginedl.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/drumgizmo/audiooutputenginedl.cc b/drumgizmo/audiooutputenginedl.cc
index ad8d815..513d21b 100644
--- a/drumgizmo/audiooutputenginedl.cc
+++ b/drumgizmo/audiooutputenginedl.cc
@@ -105,6 +105,12 @@ AudioOutputEngineDL::AudioOutputEngineDL(std::string name)
return;
}
+ o_bufsize = (output_bufsize_func_t) dlsym(lib, "bufsize");
+ dlsym_error = dlerror();
+ if(dlsym_error) {
+ o_bufsize = NULL;
+ }
+
ptr = o_create();
if(is_jack_plugin) {
@@ -169,6 +175,12 @@ void AudioOutputEngineDL::post(size_t size)
return o_post(ptr, size);
}
+size_t AudioOutputEngineDL::getBufferSize()
+{
+ if(o_bufsize) return o_bufsize(ptr);
+ return 1024;
+}
+
#ifdef TEST_AUDIOOUTPUTENGINEDL
//Additional dependency files
//deps: