aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-26 10:19:14 +0200
committerMax Kellermann <max@duempel.org>2014-08-26 10:22:35 +0200
commite44ea5038e316d9002e8f9aa055f5c7e7642a782 (patch)
tree2f5b219889f1cd865ff6a035eb78aebcaedf9020
parentb111aa0111565c4d6f1d7e56a16a34c5287a5145 (diff)
downloadmpd-e44ea5038e316d9002e8f9aa055f5c7e7642a782.tar.gz
mpd-e44ea5038e316d9002e8f9aa055f5c7e7642a782.tar.xz
mpd-e44ea5038e316d9002e8f9aa055f5c7e7642a782.zip
output/alsa: merge Init() into Configure()
Diffstat (limited to '')
-rw-r--r--src/output/plugins/AlsaOutputPlugin.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index 04e2bced3..4ac314a2a 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -132,10 +132,6 @@ struct AlsaOutput {
mode(0), writei(snd_pcm_writei) {
}
- bool Init(const config_param &param, Error &error) {
- return base.Configure(param, error);
- }
-
bool Configure(const config_param &param, Error &error);
};
@@ -148,8 +144,11 @@ alsa_device(const AlsaOutput *ad)
}
inline bool
-AlsaOutput::Configure(const config_param &param, gcc_unused Error &error)
+AlsaOutput::Configure(const config_param &param, Error &error)
{
+ if (!base.Configure(param, error))
+ return false;
+
device = param.GetBlockValue("device", "");
use_mmap = param.GetBlockValue("use_mmap", false);
@@ -183,7 +182,7 @@ alsa_init(const config_param &param, Error &error)
{
AlsaOutput *ad = new AlsaOutput();
- if (!ad->Init(param, error) || !ad->Configure(param, error)) {
+ if (!ad->Configure(param, error)) {
delete ad;
return nullptr;
}