From 0f18336bc2a597f2625a46ea714e838d03e340b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 10:09:18 +0200 Subject: more consistent style of output engines' getters --- drumgizmo/drumgizmoc.cc | 2 +- drumgizmo/output/alsa.cc | 2 +- drumgizmo/output/alsa.h | 2 +- drumgizmo/output/jackaudio.cc | 4 ++-- drumgizmo/output/jackaudio.h | 4 ++-- drumgizmo/output/wavfile.cc | 2 +- drumgizmo/output/wavfile.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'drumgizmo') diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc index 14a71b3..24d16e8 100644 --- a/drumgizmo/drumgizmoc.cc +++ b/drumgizmo/drumgizmoc.cc @@ -398,7 +398,7 @@ int CliMain::run(int argc, char* argv[]) } printf("done.\n"); - gizmo.setSamplerate(oe->samplerate()); + gizmo.setSamplerate(oe->getSamplerate()); if(!gizmo.init()) { diff --git a/drumgizmo/output/alsa.cc b/drumgizmo/output/alsa.cc index 66a78c0..aea80a6 100644 --- a/drumgizmo/output/alsa.cc +++ b/drumgizmo/output/alsa.cc @@ -187,7 +187,7 @@ void AlsaOutputEngine::post(size_t nsamples) snd_pcm_writei(handle, data.data(), nsamples); } -size_t AlsaOutputEngine::samplerate() +size_t AlsaOutputEngine::getSamplerate() const { return srate; } diff --git a/drumgizmo/output/alsa.h b/drumgizmo/output/alsa.h index a769c54..cc28f94 100644 --- a/drumgizmo/output/alsa.h +++ b/drumgizmo/output/alsa.h @@ -49,7 +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 samplerate() override; + size_t getSamplerate() const override; private: snd_pcm_t* handle; diff --git a/drumgizmo/output/jackaudio.cc b/drumgizmo/output/jackaudio.cc index 52e1d41..7710e14 100644 --- a/drumgizmo/output/jackaudio.cc +++ b/drumgizmo/output/jackaudio.cc @@ -113,12 +113,12 @@ void JackAudioOutputEngine::process(jack_nframes_t num_frames) sema.post(); } -size_t JackAudioOutputEngine::getBufferSize() +size_t JackAudioOutputEngine::getBufferSize() const { return client.getBufferSize(); } -size_t JackAudioOutputEngine::samplerate() +size_t JackAudioOutputEngine::getSamplerate() const { return client.getSampleRate(); } diff --git a/drumgizmo/output/jackaudio.h b/drumgizmo/output/jackaudio.h index b71ff8e..324e95a 100644 --- a/drumgizmo/output/jackaudio.h +++ b/drumgizmo/output/jackaudio.h @@ -47,8 +47,8 @@ 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() override; - size_t samplerate() override; + size_t getBufferSize() const override; + size_t getSamplerate() const override; // based on JackProcess void process(jack_nframes_t num_frames) override; diff --git a/drumgizmo/output/wavfile.cc b/drumgizmo/output/wavfile.cc index 78f7899..a9d8b0b 100644 --- a/drumgizmo/output/wavfile.cc +++ b/drumgizmo/output/wavfile.cc @@ -125,7 +125,7 @@ void WavfileOutputEngine::post(size_t nsamples) { } -size_t WavfileOutputEngine::samplerate() +size_t WavfileOutputEngine::getSamplerate() const { return info.samplerate; } diff --git a/drumgizmo/output/wavfile.h b/drumgizmo/output/wavfile.h index a0019d3..dfe422c 100644 --- a/drumgizmo/output/wavfile.h +++ b/drumgizmo/output/wavfile.h @@ -47,7 +47,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 samplerate() override; + size_t getSamplerate() const override; private: SF_INFO info; -- cgit v1.2.3