From b97e92468fa137780fe980eaf3d999bdc83d800a Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Wed, 14 Jul 2010 17:33:29 -0700 Subject: Modify version string to post-release version 0.15.12~git --- NEWS | 3 +++ configure.ac | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 65d693166..85d34ddb6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +ver 0.15.12 (2010/??/??) + + ver 0.15.11 (2010/06/14) * tags: - ape: support album artist diff --git a/configure.ac b/configure.ac index 60901a3f6..791f41f05 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.15.11, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.15.12~git, musicpd-dev-team@lists.sourceforge.net) AC_CONFIG_SRCDIR([src/main.c]) AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2]) AM_CONFIG_HEADER(config.h) -- cgit v1.2.3 From 898a13f196eb005c969794bf16d8afa858a48f33 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 18:26:13 +0200 Subject: decoder/wildmidi: support version 0.2.3 In libwildmidi 0.2.3, the function WildMidi_SampledSeek() was removed, without changing the SO name. This patch adds an autoconf check for that function. Fall back to WildMidi_FastSeek() if WildMidi_SampledSeek() is not available anymore. --- NEWS | 2 ++ configure.ac | 4 ++++ src/decoder/wildmidi_plugin.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 85d34ddb6..1dd15e4b3 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.12 (2010/??/??) +* decoders: + - wildmidi: support version 0.2.3 ver 0.15.11 (2010/06/14) diff --git a/configure.ac b/configure.ac index 791f41f05..aa529ca45 100644 --- a/configure.ac +++ b/configure.ac @@ -950,6 +950,10 @@ if test x$enable_wildmidi = xyes; then AC_CHECK_LIB(WildMidi, WildMidi_Init,, AC_MSG_ERROR([libwildmidi not found])) + AC_CHECK_LIB(WildMidi, WildMidi_SampledSeek, + [AC_DEFINE(HAVE_WILDMIDI_SAMPLED_SEEK, 1, + [Defined if WildMidi_SampledSeek() is available (libwildmidi <= 0.2.2)])]) + CFLAGS=$oldcflags LIBS=$oldlibs CPPFLAGS=$oldcppflags diff --git a/src/decoder/wildmidi_plugin.c b/src/decoder/wildmidi_plugin.c index 8bad6943a..b5e9810f9 100644 --- a/src/decoder/wildmidi_plugin.c +++ b/src/decoder/wildmidi_plugin.c @@ -99,7 +99,11 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs) unsigned long seek_where = WILDMIDI_SAMPLE_RATE * decoder_seek_where(decoder); +#ifdef HAVE_WILDMIDI_SAMPLED_SEEK WildMidi_SampledSeek(wm, &seek_where); +#else + WildMidi_FastSeek(wm, &seek_where); +#endif decoder_command_finished(decoder); cmd = DECODE_COMMAND_NONE; } -- cgit v1.2.3 From 172182b18f00e062a4eae22dd4d0032750f37367 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 18:11:58 +0200 Subject: decoder/mad: parse_rva2() returns bool --- src/decoder/mad_plugin.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/decoder/mad_plugin.c b/src/decoder/mad_plugin.c index ee07ae5a4..88bc4c214 100644 --- a/src/decoder/mad_plugin.c +++ b/src/decoder/mad_plugin.c @@ -209,14 +209,14 @@ mp3_fill_buffer(struct mp3_data *data) #ifdef HAVE_ID3TAG /* Parse mp3 RVA2 frame. Shamelessly stolen from madplay. */ -static int parse_rva2(struct id3_tag * tag, struct replay_gain_info * replay_gain_info) +static bool +parse_rva2(struct id3_tag *tag, struct replay_gain_info *replay_gain_info) { struct id3_frame const * frame; id3_latin1_t const *id; id3_byte_t const *data; id3_length_t length; - int found; enum { CHANNEL_OTHER = 0x00, @@ -230,18 +230,18 @@ static int parse_rva2(struct id3_tag * tag, struct replay_gain_info * replay_gai CHANNEL_SUBWOOFER = 0x08 }; - found = 0; - /* relative volume adjustment information */ frame = id3_tag_findframe(tag, "RVA2", 0); - if (!frame) return 0; + if (frame == NULL) + return false; id = id3_field_getlatin1(id3_frame_field(frame, 0)); data = id3_field_getbinarydata(id3_frame_field(frame, 1), &length); - if (!id || !data) return 0; + if (id == NULL || data == NULL) + return false; /* * "The 'identification' string is used to identify the @@ -284,15 +284,14 @@ static int parse_rva2(struct id3_tag * tag, struct replay_gain_info * replay_gai "%+.1f dB adjustment (%s)\n", voladj_float, id); - found = 1; - break; + return true; } data += 4 + peak_bytes; length -= 4 + peak_bytes; } - return found; + return false; } #endif -- cgit v1.2.3 From 8b055c3127fb65aaeceb571b7db264c066b9cc3f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 22:32:55 +0200 Subject: tag_rva2: set "gain", not "peak" RVA2 tags only store the "gain" value, there is no "peak" attribute. --- NEWS | 2 ++ src/decoder/mad_plugin.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 1dd15e4b3..a43fa5d7c 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.12 (2010/??/??) +* tags: + - rva2: set "gain", not "peak" * decoders: - wildmidi: support version 0.2.3 diff --git a/src/decoder/mad_plugin.c b/src/decoder/mad_plugin.c index 88bc4c214..9b3259485 100644 --- a/src/decoder/mad_plugin.c +++ b/src/decoder/mad_plugin.c @@ -277,8 +277,8 @@ parse_rva2(struct id3_tag *tag, struct replay_gain_info *replay_gain_info) voladj_float = (double) voladj_fixed / 512; - replay_gain_info->tuples[REPLAY_GAIN_TRACK].peak = voladj_float; - replay_gain_info->tuples[REPLAY_GAIN_ALBUM].peak = voladj_float; + replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = voladj_float; + replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = voladj_float; g_debug("parseRVA2: Relative Volume " "%+.1f dB adjustment (%s)\n", -- cgit v1.2.3 From a4908dca428dda7a3e83bfaf0d7e96d2b6242b73 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 22:37:34 +0200 Subject: input/curl: query timeout from CURL Use curl_multi_timeout() to determine the select() timeout, instead of hard-coding one second. --- src/input/curl_input_plugin.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index 43010c8bb..ff1ac85c5 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -241,7 +241,6 @@ input_curl_select(struct input_curl *c) fd_set rfds, wfds, efds; int max_fd, ret; CURLMcode mcode; - /* XXX hard coded timeout value.. */ struct timeval timeout = { .tv_sec = 1, .tv_usec = 0, @@ -262,6 +261,24 @@ input_curl_select(struct input_curl *c) assert(max_fd >= 0); +#if LIBCURL_VERSION_NUM >= 0x070f00 + long timeout2; + mcode = curl_multi_timeout(c->multi, &timeout2); + if (mcode != CURLM_OK) { + g_warning("curl_multi_timeout() failed: %s\n", + curl_multi_strerror(mcode)); + return -1; + } + + if (timeout2 >= 0) { + if (timeout2 > 10000) + timeout2 = 10000; + + timeout.tv_sec = timeout2 / 1000; + timeout.tv_usec = (timeout2 % 1000) * 1000; + } +#endif + ret = select(max_fd + 1, &rfds, &wfds, &efds, &timeout); if (ret < 0) g_warning("select() failed: %s\n", strerror(errno)); -- cgit v1.2.3 From 1f976d6e543aca95f2fdfb64f970446e94ad5796 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 22:49:29 +0200 Subject: input/curl: remove assertion after curl_multi_fdset() Some users reported that MPD crashes when using a new CURL version with the threaded DNS resolver enabled. It seems that curl_multi_fdset() returns no file descriptor when the DNS resolver runs in another thread, so MPD does not have any event to wait for. On the CURL mailing list, somebody suggested to sleep for a fixed amount of time. This is not an elegant solution, because daemons should never have to sleep without waiting for an event. I hope the CURL developers will review the API and remove the threaded DNS resolver. Meanwhile, I'm removing the assertion in question, to allow those unfortunate users running the latest CURL version to continue using MPD. --- NEWS | 2 ++ src/input/curl_input_plugin.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a43fa5d7c..8adec16b3 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.12 (2010/??/??) +* input: + - curl: remove assertion after curl_multi_fdset() * tags: - rva2: set "gain", not "peak" * decoders: diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index ff1ac85c5..c176f20dc 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -259,8 +259,6 @@ input_curl_select(struct input_curl *c) return -1; } - assert(max_fd >= 0); - #if LIBCURL_VERSION_NUM >= 0x070f00 long timeout2; mcode = curl_multi_timeout(c->multi, &timeout2); -- cgit v1.2.3 From 0fec8e08641470fdcaeb68fc362f77ca78925011 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Jul 2010 22:57:57 +0200 Subject: mpd version 0.15.12 --- NEWS | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8adec16b3..f22a18ac8 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.15.12 (2010/??/??) +ver 0.15.12 (2010/07/20) * input: - curl: remove assertion after curl_multi_fdset() * tags: diff --git a/configure.ac b/configure.ac index aa529ca45..b58508efc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.15.12~git, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.15.12, musicpd-dev-team@lists.sourceforge.net) AC_CONFIG_SRCDIR([src/main.c]) AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2]) AM_CONFIG_HEADER(config.h) -- cgit v1.2.3