decoder/mad: make "gapless_mp3_playback" a block option

Remove another dependency on the config/Global library.
This commit is contained in:
Max Kellermann
2018-07-18 10:50:09 +02:00
parent 49efb6071c
commit fd80683ade
7 changed files with 44 additions and 21 deletions

@@ -21,7 +21,7 @@
#include "MadDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "input/InputStream.hxx"
#include "config/Global.hxx"
#include "config/Block.hxx"
#include "tag/Id3Scan.hxx"
#include "tag/Rva2.hxx"
#include "tag/Handler.hxx"
@@ -107,10 +107,10 @@ mad_fixed_to_24_buffer(int32_t *dest, const struct mad_synth *synth,
}
static bool
mp3_plugin_init(gcc_unused const ConfigBlock &block)
mp3_plugin_init(const ConfigBlock &block)
{
gapless_playback = config_get_bool(ConfigOption::GAPLESS_MP3_PLAYBACK,
DEFAULT_GAPLESS_MP3_PLAYBACK);
gapless_playback = block.GetBlockValue("gapless",
DEFAULT_GAPLESS_MP3_PLAYBACK);
return true;
}