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/output/jackaudio | |
parent | 29ec8552826f64bfa8cad01a433306886328c522 (diff) | |
parent | 2e7176bc558cb03d4e7c27769bab9cd45c703332 (diff) |
Merge branch 'resample'
Add resample support.
Diffstat (limited to 'drumgizmo/output/jackaudio')
-rw-r--r-- | drumgizmo/output/jackaudio/jackaudio.cc | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drumgizmo/output/jackaudio/jackaudio.cc b/drumgizmo/output/jackaudio/jackaudio.cc index 2afe1ea..5c04146 100644 --- a/drumgizmo/output/jackaudio/jackaudio.cc +++ b/drumgizmo/output/jackaudio/jackaudio.cc @@ -54,6 +54,7 @@ public: void jack_process(jack_nframes_t nframes); size_t bufsize(); + size_t samplerate(); private: JackClient *jackclient; @@ -146,6 +147,11 @@ size_t JackAudio::bufsize() return jack_get_buffer_size(jackclient->jack_client); } +size_t JackAudio::samplerate() +{ + return jack_get_sample_rate(jackclient->jack_client); +} + extern "C" { void *create() { @@ -205,21 +211,10 @@ extern "C" { JackAudio *jack = (JackAudio*)h; return jack->bufsize(); } -} - -#ifdef TEST_AUDIOINPUTENGINEJACKAUDIO -//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_AUDIOINPUTENGINEJACKAUDIO*/ + size_t samplerate(void *h) + { + JackAudio *jack = (JackAudio*)h; + return jack->samplerate(); + } +} |