diff --git a/NEWS b/NEWS index 1a4eca114..060e98fb6 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ ver 0.22 (not yet released) * archive - iso9660: support seeking * decoder + - mad: remove option "gapless", always do gapless - sidplay: add option "default_genre" - sidplay: map SID name field to "Album" tag * filter diff --git a/doc/plugins.rst b/doc/plugins.rst index b9093dce0..538292e88 100644 --- a/doc/plugins.rst +++ b/doc/plugins.rst @@ -406,15 +406,6 @@ plugin should be enabled only if you have a bit-perfect playback path to a DSD-capable DAC; for everybody else, playing back the ALAC copy of the file is better. -.. list-table:: - :widths: 20 80 - :header-rows: 1 - - * - Setting - - Description - * - **gapless yes|no** - - This specifies whether to support gapless playback of MP3s which have the necessary headers. Useful if your MP3s have headers with incorrect information. If you have such MP3s, it is highly recommended that you fix them using `vbrfix `_ instead of disabling gapless MP3 playback. The default is to support gapless MP3 playback. - mad --- diff --git a/src/config/Migrate.cxx b/src/config/Migrate.cxx index a50a0b821..895cc3ae8 100644 --- a/src/config/Migrate.cxx +++ b/src/config/Migrate.cxx @@ -55,17 +55,8 @@ 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/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 13ec770af..e600ed356 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -62,12 +62,8 @@ enum class MadDecoderMuteFrame { /* the number of samples of silence the decoder inserts at start */ static constexpr unsigned DECODERDELAY = 529; -static constexpr bool DEFAULT_GAPLESS_MP3_PLAYBACK = true; - static constexpr Domain mad_domain("mad"); -static bool gapless_playback; - gcc_const static SongTime ToSongTime(mad_timer_t t) noexcept @@ -100,14 +96,6 @@ mad_fixed_to_24_buffer(int32_t *dest, const struct mad_pcm &src, *dest++ = mad_fixed_to_24_sample(src.samples[c][i]); } -static bool -mad_plugin_init(const ConfigBlock &block) -{ - gapless_playback = block.GetBlockValue("gapless", - DEFAULT_GAPLESS_MP3_PLAYBACK); - return true; -} - class MadDecoder { static constexpr size_t READ_BUFFER_SIZE = 40960; @@ -735,7 +723,7 @@ MadDecoder::DecodeFirstFrame(Tag *tag) noexcept struct lame lame; if (parse_lame(&lame, &ptr, &bitlen)) { - if (gapless_playback && input_stream.IsSeekable()) { + if (input_stream.IsSeekable()) { /* libmad inserts 529 samples of silence at the beginning and removes those 529 samples at the @@ -1030,6 +1018,5 @@ static const char *const mad_mime_types[] = { "audio/mpeg", nullptr }; constexpr DecoderPlugin mad_decoder_plugin = DecoderPlugin("mad", mad_decode, mad_decoder_scan_stream) - .WithInit(mad_plugin_init) .WithSuffixes(mad_suffixes) .WithMimeTypes(mad_mime_types);