diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config/Migrate.cxx | 9 | ||||
-rw-r--r-- | src/config/Templates.cxx | 2 | ||||
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/src/config/Migrate.cxx b/src/config/Migrate.cxx index 9c1ebf7df..fa401dd2d 100644 --- a/src/config/Migrate.cxx +++ b/src/config/Migrate.cxx @@ -56,8 +56,17 @@ MigrateCurlProxyConfig(ConfigData &config) noexcept "proxy_password"); } +static void +MigrateMadConfig(ConfigData &config) noexcept +{ + MigrateParamToBlockParam(config, ConfigOption::GAPLESS_MP3_PLAYBACK, + ConfigBlockOption::DECODER, "plugin", "mad", + "gapless"); +} + void Migrate(ConfigData &config) noexcept { MigrateCurlProxyConfig(config); + MigrateMadConfig(config); } diff --git a/src/config/Templates.cxx b/src/config/Templates.cxx index f09321a74..3c2d78aae 100644 --- a/src/config/Templates.cxx +++ b/src/config/Templates.cxx @@ -68,7 +68,7 @@ const ConfigTemplate config_param_templates[] = { { "id3v1_encoding", false, true }, { "metadata_to_use" }, { "save_absolute_paths_in_playlists" }, - { "gapless_mp3_playback" }, + { "gapless_mp3_playback", false, true }, { "auto_update" }, { "auto_update_depth" }, { "despotify_user", false, true }, diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 65c840424..4ad0efc0d 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -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; } |