summaryrefslogtreecommitdiff
path: root/drumgizmo/output/jackaudio
diff options
context:
space:
mode:
Diffstat (limited to 'drumgizmo/output/jackaudio')
-rw-r--r--drumgizmo/output/jackaudio/jackaudio.cc29
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();
+ }
+}