diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-12-05 20:34:12 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-12-05 20:34:12 +0100 |
commit | 3b0d9e0c9c5e08b2e449aa266617fb1db86b5a22 (patch) | |
tree | f203a59c944714925d73ae2d33ad9c67d5b17070 /drumgizmo/audiooutputenginedl.cc | |
parent | 29ec8552826f64bfa8cad01a433306886328c522 (diff) | |
parent | 2e7176bc558cb03d4e7c27769bab9cd45c703332 (diff) |
Merge branch 'resample'
Add resample support.
Diffstat (limited to 'drumgizmo/audiooutputenginedl.cc')
-rw-r--r-- | drumgizmo/audiooutputenginedl.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/drumgizmo/audiooutputenginedl.cc b/drumgizmo/audiooutputenginedl.cc index 513d21b..2648e8f 100644 --- a/drumgizmo/audiooutputenginedl.cc +++ b/drumgizmo/audiooutputenginedl.cc @@ -111,6 +111,13 @@ AudioOutputEngineDL::AudioOutputEngineDL(std::string name) o_bufsize = NULL; } + o_samplerate = (output_samplerate_func_t) dlsym(lib, "samplerate"); + dlsym_error = dlerror(); + if(dlsym_error) { + printf("Cannot load symbol samplerate: %s\n", dlsym_error); + return; + } + ptr = o_create(); if(is_jack_plugin) { @@ -181,19 +188,8 @@ size_t AudioOutputEngineDL::getBufferSize() return 1024; } -#ifdef TEST_AUDIOOUTPUTENGINEDL -//Additional dependency files -//deps: -//Required cflags (autoconf vars may be used) -//cflags: -//Required link options (autoconf vars may be used) -//libs: -#include "test.h" - -TEST_BEGIN; - -// TODO: Put some testcode here (see test.h for usable macros). - -TEST_END; - -#endif/*TEST_AUDIOOUTPUTENGINEDL*/ +size_t AudioOutputEngineDL::samplerate() +{ + if(o_samplerate) return o_samplerate(ptr); + return 44100; +} |