From a6fecd6c05b07bd5238bbace2098105e9e1e8c66 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sun, 3 Jun 2007 19:25:25 +0000 Subject: Making some bool options more consistent. git-svn-id: https://svn.musicpd.org/mpd/trunk@6468 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/mp3_plugin.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/inputPlugins/mp3_plugin.c') diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index a920b98a1..3c958705a 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -58,7 +58,7 @@ #define DEFAULT_GAPLESS_MP3_PLAYBACK 1 -static int gaplessPlayback; +static int gaplessPlaybackEnabled; /* this is stolen from mpg321! */ struct audio_dither { @@ -120,9 +120,11 @@ static signed long audio_linear_dither(unsigned int bits, mad_fixed_t sample, static int mp3_plugin_init(void) { - gaplessPlayback = getBoolConfigParam(CONF_GAPLESS_MP3_PLAYBACK); - if (gaplessPlayback == -1) gaplessPlayback = DEFAULT_GAPLESS_MP3_PLAYBACK; - else if (gaplessPlayback < 0) exit(EXIT_FAILURE); + gaplessPlaybackEnabled = getBoolConfigParam(CONF_GAPLESS_MP3_PLAYBACK); + if (gaplessPlaybackEnabled == -1) + gaplessPlaybackEnabled = DEFAULT_GAPLESS_MP3_PLAYBACK; + else if (gaplessPlaybackEnabled < 0) + exit(EXIT_FAILURE); return 1; } @@ -692,7 +694,7 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, data->foundXing = 1; data->muteFrame = MUTEFRAME_SKIP; - if (gaplessPlayback && data->inStream->seekable && + if (gaplessPlaybackEnabled && data->inStream->seekable && parse_lame(&lame, &ptr, &bitlen)) { data->dropSamplesAtStart = lame.encoderDelay + DECODERDELAY; data->dropSamplesAtEnd = lame.encoderPadding; -- cgit v1.2.3