aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/plugins/OssOutputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-21 22:13:44 +0100
committerMax Kellermann <max@duempel.org>2015-01-21 23:56:33 +0100
commit4fa5538e2bed36903b403e1aaee2462d22b456dc (patch)
tree292b66e10e6b97e2363fde34a81c027a67d3a9fe /src/output/plugins/OssOutputPlugin.cxx
parent84e74173de85a3897cfe67150297987f8c8bf52e (diff)
downloadmpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.tar.gz
mpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.tar.xz
mpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.zip
config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
Diffstat (limited to 'src/output/plugins/OssOutputPlugin.cxx')
-rw-r--r--src/output/plugins/OssOutputPlugin.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx
index 1b14e16c7..7f75f4e31 100644
--- a/src/output/plugins/OssOutputPlugin.cxx
+++ b/src/output/plugins/OssOutputPlugin.cxx
@@ -87,11 +87,11 @@ public:
:base(oss_output_plugin),
fd(-1), device(_device) {}
- bool Initialize(const config_param &param, Error &error_r) {
- return base.Configure(param, error_r);
+ bool Initialize(const ConfigBlock &block, Error &error_r) {
+ return base.Configure(block, error_r);
}
- static OssOutput *Create(const config_param &param, Error &error);
+ static OssOutput *Create(const ConfigBlock &block, Error &error);
#ifdef AFMT_S24_PACKED
bool Enable(gcc_unused Error &error) {
@@ -192,7 +192,7 @@ oss_open_default(Error &error)
int err[ARRAY_SIZE(default_devices)];
enum oss_stat ret[ARRAY_SIZE(default_devices)];
- const config_param empty;
+ const ConfigBlock empty;
for (int i = ARRAY_SIZE(default_devices); --i >= 0; ) {
ret[i] = oss_stat_device(default_devices[i], &err[i]);
if (ret[i] == OSS_STAT_NO_ERROR) {
@@ -236,12 +236,12 @@ oss_open_default(Error &error)
}
inline OssOutput *
-OssOutput::Create(const config_param &param, Error &error)
+OssOutput::Create(const ConfigBlock &block, Error &error)
{
- const char *device = param.GetBlockValue("device");
+ const char *device = block.GetBlockValue("device");
if (device != nullptr) {
OssOutput *od = new OssOutput();
- if (!od->Initialize(param, error)) {
+ if (!od->Initialize(block, error)) {
delete od;
return nullptr;
}