summaryrefslogtreecommitdiff
path: root/drumgizmo/output/alsa.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-25 15:51:53 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:17 +0100
commitd3554736c13531898fb720b34772a595620e661a (patch)
tree85e6f76e2b37785405ddf6685801ab9e9f9125cb /drumgizmo/output/alsa.cc
parent100e2d3bd46f64df730c8a375559680c577036ef (diff)
reformatting fix
Diffstat (limited to 'drumgizmo/output/alsa.cc')
-rw-r--r--drumgizmo/output/alsa.cc33
1 files changed, 24 insertions, 9 deletions
diff --git a/drumgizmo/output/alsa.cc b/drumgizmo/output/alsa.cc
index 26cb0cf..c577c72 100644
--- a/drumgizmo/output/alsa.cc
+++ b/drumgizmo/output/alsa.cc
@@ -33,11 +33,11 @@ int const BUFFER_SIZE = 40960;
struct AlsaInitError
{
int const code;
- std::string const msg;
+ const std::string msg;
- AlsaInitError(int op_code, std::string const &msg) : code{code}, msg{msg} {}
+ AlsaInitError(int op_code, const std::string &msg) : code{code}, msg{msg} {}
- static inline void test(int code, std::string const &msg)
+ static inline void test(int code, const std::string &msg)
{
if (code < 0)
{
@@ -47,8 +47,13 @@ struct AlsaInitError
};
AlsaOutputEngine::AlsaOutputEngine()
- : handle{nullptr}, params{nullptr}, data{}, num_channels{0u},
- dev{"default"}, srate{44100}, frames{32}
+ : handle{nullptr}
+ , params{nullptr}
+ , data{}
+ , num_channels{0u}
+ , dev{"default"}
+ , srate{44100}
+ , frames{32}
{
}
@@ -144,11 +149,18 @@ void AlsaOutputEngine::setParm(std::string parm, std::string value)
}
}
-bool AlsaOutputEngine::start() { return true; }
+bool AlsaOutputEngine::start()
+{
+ return true;
+}
-void AlsaOutputEngine::stop() {}
+void AlsaOutputEngine::stop()
+{
+}
-void AlsaOutputEngine::pre(size_t nsamples) {}
+void AlsaOutputEngine::pre(size_t nsamples)
+{
+}
void AlsaOutputEngine::run(int ch, sample_t *samples, size_t nsamples)
{
@@ -165,4 +177,7 @@ void AlsaOutputEngine::post(size_t nsamples)
snd_pcm_writei(handle, data.data(), nsamples);
}
-size_t AlsaOutputEngine::samplerate() { return srate; }
+size_t AlsaOutputEngine::samplerate()
+{
+ return srate;
+}