summaryrefslogtreecommitdiff
path: root/drumgizmo/output/jackaudio
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-05-17 21:27:52 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-05-17 21:27:52 +0200
commit0e048dee411cc20beb2a8667e5bb339f9b7fb939 (patch)
treec9bacf6f2491f5ae6feb4f4786688ef5659f5c9b /drumgizmo/output/jackaudio
parentb6405171c6a74a5227555a9b75c03f88a5f21ed2 (diff)
New resample feature on output channels.
Diffstat (limited to 'drumgizmo/output/jackaudio')
-rw-r--r--drumgizmo/output/jackaudio/jackaudio.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/drumgizmo/output/jackaudio/jackaudio.cc b/drumgizmo/output/jackaudio/jackaudio.cc
index 2afe1ea..b7fa4f9 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,6 +211,12 @@ extern "C" {
JackAudio *jack = (JackAudio*)h;
return jack->bufsize();
}
+
+ size_t samplerate(void *h)
+ {
+ JackAudio *jack = (JackAudio*)h;
+ return jack->samplerate();
+ }
}
#ifdef TEST_AUDIOINPUTENGINEJACKAUDIO