diff options
Diffstat (limited to 'drumgizmo/output')
-rw-r--r-- | drumgizmo/output/jackaudio/jackaudio.cc | 12 |
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 |