config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
This commit is contained in:
@@ -38,14 +38,14 @@ static constexpr Domain adplug_domain("adplug");
|
||||
static unsigned sample_rate;
|
||||
|
||||
static bool
|
||||
adplug_init(const config_param ¶m)
|
||||
adplug_init(const ConfigBlock &block)
|
||||
{
|
||||
FormatDebug(adplug_domain, "adplug %s",
|
||||
CAdPlug::get_version().c_str());
|
||||
|
||||
Error error;
|
||||
|
||||
sample_rate = param.GetBlockValue("sample_rate", 48000u);
|
||||
sample_rate = block.GetBlockValue("sample_rate", 48000u);
|
||||
if (!audio_check_sample_rate(sample_rate, error)) {
|
||||
LogError(error);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user