diff --git a/Makefile.am b/Makefile.am index 50832a17f..eb896f8d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -352,7 +352,7 @@ android/build/gen/org/musicpd/R.java: android/build/resources.apk android/build/classes.dex: $(JAVA_SOURCE_PATHS) android/build/gen/org/musicpd/R.java @$(MKDIR_P) $(JAVA_CLASSFILES_DIR) - $(JAVAC) -source 1.5 -target 1.5 -Xlint:-options \ + $(JAVAC) -source 1.6 -target 1.6 -Xlint:-options \ -cp $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) \ -d $(JAVA_CLASSFILES_DIR) $^ $(DX) --dex --output $@ $(JAVA_CLASSFILES_DIR) diff --git a/NEWS b/NEWS index a7a93f040..abbe1d376 100644 --- a/NEWS +++ b/NEWS @@ -31,11 +31,17 @@ ver 0.21 (not yet released) - opus: support for sending metadata using ogg stream chaining * require GCC 5.0 -ver 0.20.20 (not yet released) +ver 0.20.20 (2018/05/22) * protocol - fix "modified-since" filter regression +* output + - pulse: cork stream when paused due to "single" mode * decoder - dsdiff, dsf: support more MIME types + - dsdiff, dsf: allow 4 MB ID3 tags + - opus: support R128_ALBUM_GAIN tag +* Android, Windows + - enable the "proxy" database plugin ver 0.20.19 (2018/04/26) * protocol diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 16f96a9cf..acdf78a17 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="19" + android:versionName="0.20.20"> diff --git a/android/build.py b/android/build.py index 19dcbaee7..ee64d3059 100755 --- a/android/build.py +++ b/android/build.py @@ -138,6 +138,7 @@ class AndroidNdkToolchain: # a list of third-party libraries to be used by MPD on Android from build.libs import * thirdparty_libs = [ + libmpdclient, libogg, libvorbis, opus, diff --git a/python/build/libs.py b/python/build/libs.py index c11be6188..a0818376a 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -3,10 +3,17 @@ from os.path import abspath from build.project import Project from build.zlib import ZlibProject +from build.meson import MesonProject from build.autotools import AutotoolsProject from build.ffmpeg import FfmpegProject from build.boost import BoostProject +libmpdclient = MesonProject( + 'https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.14.tar.xz', + '0a84e2791bfe3077cf22ee1784c805d5bb550803dffe56a39aa3690a38061372', + 'lib/libmpdclient.a', +) + libogg = AutotoolsProject( 'http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz', '4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08', @@ -334,8 +341,8 @@ ffmpeg = FfmpegProject( ) curl = AutotoolsProject( - 'http://curl.haxx.se/download/curl-7.59.0.tar.xz', - 'e44eaabdf916407585bf5c7939ff1161e6242b6b015d3f2f5b758b2a330461fc', + 'http://curl.haxx.se/download/curl-7.60.0.tar.xz', + '8736ff8ded89ddf7e926eec7b16f82597d029fc1469f3a551f1fafaac164e6a0', 'lib/libcurl.a', [ '--disable-shared', '--enable-static', diff --git a/python/build/meson.py b/python/build/meson.py new file mode 100644 index 000000000..4cda8ec2a --- /dev/null +++ b/python/build/meson.py @@ -0,0 +1,96 @@ +import os.path, subprocess, sys + +from build.project import Project + +class MesonProject(Project): + def __init__(self, url, md5, installed, configure_args=[], + **kwargs): + Project.__init__(self, url, md5, installed, **kwargs) + self.configure_args = configure_args + + def _make_cross_file(self, toolchain): + if toolchain.is_windows: + system = 'windows' + else: + system = 'linux' + + if toolchain.is_arm: + cpu_family = 'arm' + if toolchain.is_armv7: + cpu = 'armv7' + else: + cpu = 'armv6' + else: + cpu_family = 'x86' + if 'x86_64' in toolchain.arch: + cpu = 'x86_64' + else: + cpu = 'i686' + + # TODO: support more CPUs + endian = 'little' + + # TODO: write pkg-config wrapper + + path = os.path.join(toolchain.build_path, 'meson.cross') + os.makedirs(toolchain.build_path, exist_ok=True) + with open(path, 'w') as f: + f.write(""" +[binaries] +c = '%s' +cpp = '%s' +ar = '%s' +strip = '%s' + +[properties] +root = '%s' + +c_args = %s +c_link_args = %s + +cpp_args = %s +cpp_link_args = %s + +[host_machine] +system = '%s' +cpu_family = '%s' +cpu = '%s' +endian = '%s' + """ % (toolchain.cc, toolchain.cxx, toolchain.ar, toolchain.strip, + toolchain.install_prefix, + repr((toolchain.cppflags + ' ' + toolchain.cflags).split()), + repr(toolchain.ldflags.split()), + repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split()), + repr(toolchain.ldflags.split()), + system, cpu_family, cpu, endian)) + return path + + def configure(self, toolchain): + src = self.unpack(toolchain) + cross_file = self._make_cross_file(toolchain) + build = self.make_build_path(toolchain) + configure = [ + 'meson', + src, build, + + '--prefix', toolchain.install_prefix, + + # this is necessary because Meson uses Debian's build machine + # MultiArch path (e.g. "lib/x86_64-linux-gnu") for cross + # builds, which is obviously wrong + '--libdir', 'lib', + + '--buildtype', 'plain', + + '--default-library=static', + + '--cross-file', cross_file, + ] + self.configure_args + + subprocess.check_call(configure, env=toolchain.env) + return build + + def build(self, toolchain): + build = self.configure(toolchain) + subprocess.check_call(['ninja', 'install'], + cwd=build, env=toolchain.env) diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx index 0961d7249..ce364398b 100644 --- a/src/decoder/plugins/DsdLib.cxx +++ b/src/decoder/plugins/DsdLib.cxx @@ -128,7 +128,7 @@ dsdlib_tag_id3(InputStream &is, return; const auto count64 = size - tagoffset; - if (count64 < 10 || count64 > 1024 * 1024) + if (count64 < 10 || count64 > 4 * 1024 * 1024) return; if (!dsdlib_skip_to(nullptr, is, tagoffset)) diff --git a/src/decoder/plugins/OpusTags.cxx b/src/decoder/plugins/OpusTags.cxx index dc1bab674..fe3aff304 100644 --- a/src/decoder/plugins/OpusTags.cxx +++ b/src/decoder/plugins/OpusTags.cxx @@ -53,6 +53,14 @@ ScanOneOpusTag(const char *name, const char *value, long l = strtol(value, &endptr, 10); if (endptr > value && *endptr == 0) rgi->track.gain = double(l) / 256.; + } else if (rgi != nullptr && strcmp(name, "R128_ALBUM_GAIN") == 0) { + /* R128_ALBUM_GAIN is a Q7.8 fixed point number in + dB */ + + char *endptr; + long l = strtol(value, &endptr, 10); + if (endptr > value && *endptr == 0) + rgi->album.gain = double(l) / 256.; } tag_handler_invoke_pair(handler, ctx, name, value); diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index c599b1725..80be00b9a 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -931,6 +931,7 @@ Player::SongBorder() noexcept if (border_pause) { paused = true; pc.listener.OnBorderPause(); + pc.outputs.Pause(); idle_add(IDLE_PLAYER); } } diff --git a/win32/build.py b/win32/build.py index 38cc9c271..99203a6d6 100755 --- a/win32/build.py +++ b/win32/build.py @@ -76,6 +76,7 @@ class CrossGccToolchain: # a list of third-party libraries to be used by MPD on Android from build.libs import * thirdparty_libs = [ + libmpdclient, libogg, libvorbis, opus,