From 53909b3a74e9c752d3405fda7bc63146b9abdc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 10:02:10 +0200 Subject: pass channels to output engine by const ref --- drumgizmo/output/alsa.cc | 2 +- drumgizmo/output/alsa.h | 2 +- drumgizmo/output/jackaudio.cc | 2 +- drumgizmo/output/jackaudio.h | 2 +- drumgizmo/output/outputdummy.cc | 2 +- drumgizmo/output/outputdummy.h | 2 +- drumgizmo/output/wavfile.cc | 2 +- drumgizmo/output/wavfile.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'drumgizmo/output') diff --git a/drumgizmo/output/alsa.cc b/drumgizmo/output/alsa.cc index 3686656..66a78c0 100644 --- a/drumgizmo/output/alsa.cc +++ b/drumgizmo/output/alsa.cc @@ -71,7 +71,7 @@ AlsaOutputEngine::~AlsaOutputEngine() } } -bool AlsaOutputEngine::init(Channels channels) +bool AlsaOutputEngine::init(const Channels& channels) { // try to initialize alsa try diff --git a/drumgizmo/output/alsa.h b/drumgizmo/output/alsa.h index 4973f0b..a769c54 100644 --- a/drumgizmo/output/alsa.h +++ b/drumgizmo/output/alsa.h @@ -42,7 +42,7 @@ public: ~AlsaOutputEngine(); // based on AudioOutputEngine - bool init(Channels chan) override; + bool init(const Channels& chan) override; void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; diff --git a/drumgizmo/output/jackaudio.cc b/drumgizmo/output/jackaudio.cc index 9f68edd..52e1d41 100644 --- a/drumgizmo/output/jackaudio.cc +++ b/drumgizmo/output/jackaudio.cc @@ -43,7 +43,7 @@ JackAudioOutputEngine::~JackAudioOutputEngine() client.remove(*this); } -bool JackAudioOutputEngine::init(Channels data) +bool JackAudioOutputEngine::init(const Channels& data) { channels.clear(); channels.reserve(data.size()); diff --git a/drumgizmo/output/jackaudio.h b/drumgizmo/output/jackaudio.h index 24348f6..b71ff8e 100644 --- a/drumgizmo/output/jackaudio.h +++ b/drumgizmo/output/jackaudio.h @@ -40,7 +40,7 @@ public: ~JackAudioOutputEngine(); // based on AudioOutputEngine - bool init(Channels chan) override; + bool init(const Channels& chan) override; void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; diff --git a/drumgizmo/output/outputdummy.cc b/drumgizmo/output/outputdummy.cc index 5899ead..4ff0816 100644 --- a/drumgizmo/output/outputdummy.cc +++ b/drumgizmo/output/outputdummy.cc @@ -34,7 +34,7 @@ DummyOutputEngine::~DummyOutputEngine() { } -bool DummyOutputEngine::init(Channels data) +bool DummyOutputEngine::init(const Channels& data) { return true; } diff --git a/drumgizmo/output/outputdummy.h b/drumgizmo/output/outputdummy.h index caa9e5f..5a1b2fa 100644 --- a/drumgizmo/output/outputdummy.h +++ b/drumgizmo/output/outputdummy.h @@ -35,7 +35,7 @@ public: ~DummyOutputEngine(); // based on AudioOutputEngine - bool init(Channels chan) override; + bool init(const Channels& chan) override; void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; diff --git a/drumgizmo/output/wavfile.cc b/drumgizmo/output/wavfile.cc index e81fb2d..78f7899 100644 --- a/drumgizmo/output/wavfile.cc +++ b/drumgizmo/output/wavfile.cc @@ -50,7 +50,7 @@ WavfileOutputEngine::~WavfileOutputEngine() } } -bool WavfileOutputEngine::init(Channels data) +bool WavfileOutputEngine::init(const Channels& data) { channels.clear(); channels.resize(data.size()); // value-initialized with null diff --git a/drumgizmo/output/wavfile.h b/drumgizmo/output/wavfile.h index 331733b..a0019d3 100644 --- a/drumgizmo/output/wavfile.h +++ b/drumgizmo/output/wavfile.h @@ -40,7 +40,7 @@ public: ~WavfileOutputEngine(); // based on AudioOutputEngine - bool init(Channels data) override; + bool init(const Channels& data) override; void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; -- cgit v1.2.3