From 9310ffe5959ce4de02204b6cd251d4b4a58c69b9 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 8 Feb 2021 19:04:39 +0100 Subject: added getBufferSize function for alsa out --- drumgizmo/output/alsa.cc | 5 +++++ drumgizmo/output/alsa.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drumgizmo/output/alsa.cc b/drumgizmo/output/alsa.cc index f340c30..465b006 100644 --- a/drumgizmo/output/alsa.cc +++ b/drumgizmo/output/alsa.cc @@ -187,6 +187,11 @@ void AlsaOutputEngine::post(size_t nsamples) snd_pcm_writei(handle, data.data(), nsamples); } +size_t AlsaOutputEngine::getBufferSize() const +{ + return frames; +} + size_t AlsaOutputEngine::getSamplerate() const { return srate; diff --git a/drumgizmo/output/alsa.h b/drumgizmo/output/alsa.h index 56011b6..7a7a315 100644 --- a/drumgizmo/output/alsa.h +++ b/drumgizmo/output/alsa.h @@ -49,6 +49,7 @@ public: void pre(size_t nsamples) override; void run(int ch, sample_t* samples, size_t nsamples) override; void post(size_t nsamples) override; + size_t getBufferSize() const override; size_t getSamplerate() const override; bool isFreewheeling() const override; -- cgit v1.2.3