diff options
author | Max Kellermann <max@duempel.org> | 2015-01-21 22:13:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-01-21 23:56:33 +0100 |
commit | 4fa5538e2bed36903b403e1aaee2462d22b456dc (patch) | |
tree | 292b66e10e6b97e2363fde34a81c027a67d3a9fe /src/filter/plugins/RouteFilterPlugin.cxx | |
parent | 84e74173de85a3897cfe67150297987f8c8bf52e (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/filter/plugins/RouteFilterPlugin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/filter/plugins/RouteFilterPlugin.cxx b/src/filter/plugins/RouteFilterPlugin.cxx index f84dac8cb..11eb534c9 100644 --- a/src/filter/plugins/RouteFilterPlugin.cxx +++ b/src/filter/plugins/RouteFilterPlugin.cxx @@ -41,7 +41,7 @@ #include "config.h" #include "config/ConfigError.hxx" -#include "config/Param.hxx" +#include "config/Block.hxx" #include "AudioFormat.hxx" #include "filter/FilterPlugin.hxx" #include "filter/FilterInternal.hxx" @@ -114,11 +114,11 @@ public: * a>b, c>d, e>f, ... * where a... are non-unique, non-negative integers * and input channel a gets copied to output channel b, etc. - * @param param the configuration block to read + * @param block the configuration block to read * @param filter a route_filter whose min_channels and sources[] to set * @return true on success, false on error */ - bool Configure(const config_param ¶m, Error &error); + bool Configure(const ConfigBlock &block, Error &error); /* virtual methods from class Filter */ AudioFormat Open(AudioFormat &af, Error &error) override; @@ -128,7 +128,7 @@ public: }; bool -RouteFilter::Configure(const config_param ¶m, Error &error) { +RouteFilter::Configure(const ConfigBlock &block, Error &error) { /* TODO: * With a more clever way of marking "don't copy to output N", @@ -142,7 +142,7 @@ RouteFilter::Configure(const config_param ¶m, Error &error) { min_output_channels = 0; // A cowardly default, just passthrough stereo - const char *routes = param.GetBlockValue("routes", "0>0, 1>1"); + const char *routes = block.GetBlockValue("routes", "0>0, 1>1"); while (true) { routes = StripLeft(routes); @@ -205,10 +205,10 @@ RouteFilter::Configure(const config_param ¶m, Error &error) { } static Filter * -route_filter_init(const config_param ¶m, Error &error) +route_filter_init(const ConfigBlock &block, Error &error) { RouteFilter *filter = new RouteFilter(); - if (!filter->Configure(param, error)) { + if (!filter->Configure(block, error)) { delete filter; return nullptr; } |