diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-05-22 10:34:21 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-05-22 10:34:21 +0200 |
commit | bef1d5542f926a3b942374707dd56041013d35ff (patch) | |
tree | 71161b4239db1de08d5a3ee60399a596490f3486 /drumgizmo/output/alsa | |
parent | acf59a4f960b3e45db566675551b8158b47e1554 (diff) |
Added framesize control mechanism to the engine, and made us of it in the cachemanager and drumkitloader.
Diffstat (limited to 'drumgizmo/output/alsa')
-rw-r--r-- | drumgizmo/output/alsa/alsa.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drumgizmo/output/alsa/alsa.cc b/drumgizmo/output/alsa/alsa.cc index dc2ac73..0de3cdb 100644 --- a/drumgizmo/output/alsa/alsa.cc +++ b/drumgizmo/output/alsa/alsa.cc @@ -49,6 +49,7 @@ public: void pre(size_t size); void run(int channel, sample_t* data, size_t size); void post(size_t size); + size_t bufsize(); size_t samplerate(); private: @@ -158,6 +159,11 @@ void Alsa::post(size_t size) snd_pcm_writei(handle, data, size); } +size_t Alsa::bufsize() +{ + return frames; +} + size_t Alsa::samplerate() { return srate; @@ -217,6 +223,12 @@ extern "C" { alsa->post(s); } + size_t bufsize(void *h) + { + Alsa *alsa = (Alsa*)h; + return alsa->bufsize(); + } + size_t samplerate(void *h) { Alsa *alsa = (Alsa*)h; |