summaryrefslogtreecommitdiff
path: root/drumgizmo
diff options
context:
space:
mode:
authorVolker Fischer <corrados@users.noreply.github.com>2021-02-08 19:04:39 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-02-08 21:37:11 +0100
commit9310ffe5959ce4de02204b6cd251d4b4a58c69b9 (patch)
tree2d1a065b1daa32e28c8a46f7111ed787837b5fdd /drumgizmo
parent10ed9e59b8b9aee402547d1261463e00872e03d8 (diff)
added getBufferSize function for alsa out
Diffstat (limited to 'drumgizmo')
-rw-r--r--drumgizmo/output/alsa.cc5
-rw-r--r--drumgizmo/output/alsa.h1
2 files changed, 6 insertions, 0 deletions
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;