release v0.23.10

-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmNJ2e0NHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEjBYEACk4QtVnD52sGtz0CwThFYzekvkZHOBcP2fYOH7
 rVcQaNmV7Fpnv+iz+k7zrqhs/A8FgQq6KUNpUn3gzxae4KsA7i1yEpopIqfzRh71
 eVrjTGijMirddehsxKbkjZ1TZy5S+SkZ+Bu965qzXUZuIrErKm4m5xqkIxXBHMEc
 twK9BSCqlTT2vpND5cmX90T/NBDgZd3uQxQP2ohWjVXvg9ou2gtns18ZdYUVRTym
 rLqRLfx1rG1lS8hzKqUqt9YxbWSD606T4giC2vYg2+2OFA9VFh3TNCSaFgWEJMZe
 ou6iaX+aSoCP+H6nktxfYravwdmHvBseRtrOouxPd8Br2k1eSQGXEVlZVTKrpBME
 OZnncEGqN27GggYH1RyVZ6showJ7G05HOhGFDDs8ABR0EbAbNkGvhrjl8cGXONYH
 ScTBbvqkTrhRMOOSmiAp7X1eLJ4QICAfhCV85YzSV93u69egO1MQLYzVYUurOOyt
 TuT+XbUD+Irk3DrHvhxs/IE+ciIvilFsvCmeNjCAyH4ZPvvHt/AIskQNyF3Jj720
 XKjtq6rMF9bizut/kboPgsVQoFbnj7ncCaIZ90h27obeqqiXajTx7ixJldvwDbrp
 yKQY6xDdm7DZChqYF0KKWWzLt2BoAzqVPW3zgRfJRqb9HtQ+ZVJuljvV8bBVFKN1
 zIA4Nw==
 =GQl1
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.10'

release v0.23.10
This commit is contained in:
Max Kellermann 2022-10-14 23:56:33 +02:00
commit d6d0f78e93
13 changed files with 58 additions and 146 deletions

6
NEWS
View File

@ -22,11 +22,15 @@ ver 0.24 (not yet released)
* static partition configuration
* remove Haiku support
ver 0.23.10 (not yet released)
ver 0.23.10 (2022/10/14)
* storage
- curl: fix file time stamps
* decoder
- ffmpeg: fix libfmt 9 compiler warning
* encoder
- flac: fix failure when libFLAC is built without Ogg support
* output
- alsa: fix crash bug
* Windows
- log to stdout by default, don't require "log_file" setting

View File

@ -199,7 +199,7 @@ Compiling for Android
You need:
* Android SDK
* `Android NDK r23 <https://developer.android.com/ndk/downloads>`_
* `Android NDK r25b <https://developer.android.com/ndk/downloads>`_
* `Meson 0.56.0 <http://mesonbuild.com/>`__ and `Ninja
<https://ninja-build.org/>`__
* cmake

View File

@ -250,6 +250,14 @@ endif
fmt_dep = dependency('fmt', fallback: ['fmt', 'fmt_dep'])
if compiler.get_id() == 'clang' and compiler.version().version_compare('<15')
fmt_dep = declare_dependency(
dependencies: fmt_dep,
# suppress bogus clang 14 warning (the version in Android NDK r25b)
compile_args: ['-Wno-unused-local-typedef'],
)
endif
log = static_library(
'log',
'src/Log.cxx',

View File

@ -57,8 +57,8 @@ flac = AutotoolsProject(
)
zlib = ZlibProject(
'http://zlib.net/zlib-1.2.12.tar.xz',
'7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18',
'http://zlib.net/zlib-1.2.13.tar.xz',
'd14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98',
'lib/libz.a',
)
@ -114,16 +114,20 @@ libmodplug = AutotoolsProject(
)
libopenmpt = AutotoolsProject(
'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.5.12+release.autotools.tar.gz',
'892aea7a599b5d21842bebf463b5aafdad5711be7008dd84401920c6234820af',
'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.6.6+release.autotools.tar.gz',
'6ddb9e26a430620944891796fefb1bbb38bd9148f6cfc558810c0d3f269876c7',
'lib/libopenmpt.a',
[
'--disable-shared', '--enable-static',
'--disable-openmpt123',
'--disable-examples',
'--disable-tests',
'--disable-doxygen-doc',
'--without-mpg123', '--without-ogg', '--without-vorbis', '--without-vorbisfile',
'--without-portaudio', '--without-portaudiocpp', '--without-sndfile',
'--without-flac',
],
base='libopenmpt-0.5.12+release.autotools',
base='libopenmpt-0.6.6+release.autotools',
)
wildmidi = CmakeProject(
@ -153,8 +157,8 @@ gme = CmakeProject(
)
ffmpeg = FfmpegProject(
'http://ffmpeg.org/releases/ffmpeg-5.1.tar.xz',
'55eb6aab5ee235550fa54a33eaf8bf1b4ec66c01453182b12f6a993d75698b03',
'http://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz',
'619e706d662c8420859832ddc259cd4d4096a48a2ce1eefd052db9e440eef3dc',
'lib/libavcodec.a',
[
'--disable-shared', '--enable-static',
@ -389,8 +393,8 @@ openssl = OpenSSLProject(
)
curl = CmakeProject(
'https://curl.se/download/curl-7.84.0.tar.xz',
'2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8',
'https://curl.se/download/curl-7.85.0.tar.xz',
'88b54a6d4b9a48cb4d873c7056dcba997ddd5b7be5a2d537a4acb55c20b04be6',
'lib/libcurl.a',
[
'-DBUILD_CURL_EXE=OFF',
@ -424,8 +428,8 @@ curl = CmakeProject(
)
libnfs = AutotoolsProject(
'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.1.tar.gz',
'7ef445410b42f36b9bad426608b53ccb9ccca4101e545c383f564c11db672ca8',
'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.2.tar.gz',
'637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3',
'lib/libnfs.a',
[
'--disable-shared', '--enable-static',
@ -436,7 +440,7 @@ libnfs = AutotoolsProject(
'--disable-utils', '--disable-examples',
],
base='libnfs-libnfs-5.0.1',
base='libnfs-libnfs-5.0.2',
autoreconf=True,
)

View File

@ -46,7 +46,7 @@ Context::Initialise(JNIEnv *env) noexcept
AllocatedPath
Context::GetExternalFilesDir(JNIEnv *env, const char *type) noexcept
{
assert(_type != nullptr);
assert(type != nullptr);
jobject file = env->CallObjectMethod(Get(), getExternalFilesDir_method,
Java::String::Optional(env, type).Get());

View File

@ -49,9 +49,6 @@ Java::File::Initialise(JNIEnv *env) noexcept
AllocatedPath
Java::File::ToAbsolutePath(JNIEnv *env, jobject _file) noexcept
{
assert(env != nullptr);
assert(_file != nullptr);
LocalObject file(env, _file);
const jstring path = GetAbsolutePath(env, file);

View File

@ -810,8 +810,12 @@ AlsaOutput::Open(AudioFormat &audio_format)
fmt::format("Failed to open ALSA device \"{}\"",
GetDevice()).c_str());
const char *pcm_name = snd_pcm_name(pcm);
if (pcm_name == nullptr)
pcm_name = "?";
FmtDebug(alsa_output_domain, "opened {} type={}",
snd_pcm_name(pcm),
pcm_name,
snd_pcm_type_name(snd_pcm_type(pcm)));
#ifdef ENABLE_DSD

View File

@ -34,7 +34,6 @@
#include "event/InjectEvent.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "time/Parser.hxx"
#include "util/ASCII.hxx"
#include "util/RuntimeError.hxx"
#include "util/SpanCast.hxx"
@ -173,8 +172,9 @@ struct DavResponse {
}
};
[[gnu::pure]]
static unsigned
ParseStatus(const char *s)
ParseStatus(const char *s) noexcept
{
/* skip the "HTTP/1.1" prefix */
const char *space = std::strchr(s, ' ');
@ -184,37 +184,37 @@ ParseStatus(const char *s)
return strtoul(space + 1, nullptr, 10);
}
[[gnu::pure]]
static unsigned
ParseStatus(const char *s, size_t length)
ParseStatus(const char *s, size_t length) noexcept
{
return ParseStatus(std::string(s, length).c_str());
}
[[gnu::pure]]
static std::chrono::system_clock::time_point
ParseTimeStamp(const char *s)
ParseTimeStamp(const char *s) noexcept
{
try {
// TODO: make this more robust
return ParseTimePoint(s, "%a, %d %b %Y %T");
} catch (...) {
return std::chrono::system_clock::time_point::min();
}
return std::chrono::system_clock::from_time_t(curl_getdate(s, nullptr));
}
[[gnu::pure]]
static std::chrono::system_clock::time_point
ParseTimeStamp(const char *s, size_t length)
ParseTimeStamp(const char *s, size_t length) noexcept
{
return ParseTimeStamp(std::string(s, length).c_str());
}
[[gnu::pure]]
static uint64_t
ParseU64(const char *s)
ParseU64(const char *s) noexcept
{
return strtoull(s, nullptr, 10);
}
[[gnu::pure]]
static uint64_t
ParseU64(const char *s, size_t length)
ParseU64(const char *s, size_t length) noexcept
{
return ParseU64(std::string(s, length).c_str());
}
@ -280,6 +280,7 @@ public:
"<a:resourcetype/>"
"<a:getcontenttype/>"
"<a:getcontentlength/>"
"<a:getlastmodified/>"
"</a:prop>"
"</a:propfind>");
}

View File

@ -1,57 +0,0 @@
/*
* Copyright 2014-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Parser.hxx"
#include "Convert.hxx"
#include <cassert>
#include <stdexcept>
#include <time.h>
std::chrono::system_clock::time_point
ParseTimePoint(const char *s, const char *format)
{
assert(s != nullptr);
assert(format != nullptr);
#ifdef _WIN32
/* TODO: emulate strptime()? */
(void)s;
(void)format;
throw std::runtime_error("Time parsing not implemented on Windows");
#else
struct tm tm{};
const char *end = strptime(s, format, &tm);
if (end == nullptr || *end != 0)
throw std::runtime_error("Failed to parse time stamp");
return TimeGm(tm);
#endif /* !_WIN32 */
}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2014-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TIME_PARSER_HXX
#define TIME_PARSER_HXX
#include <chrono>
/**
* Parse a time stamp.
*
* Throws std::runtime_error on error.
*/
std::chrono::system_clock::time_point
ParseTimePoint(const char *s, const char *format);
#endif

View File

@ -1,6 +1,5 @@
time = static_library(
'time',
'Parser.cxx',
'Convert.cxx',
'ISO8601.cxx',
'Math.cxx',

View File

@ -1,12 +1,12 @@
[wrap-file]
directory = expat-2.4.8
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz
source_filename = expat-2.4.8.tar.bz2
source_hash = f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25
patch_filename = expat_2.4.8-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.8-2/get_patch
patch_hash = e8855d668a0dee74dee909521c91d6723f564167fcad65507fec63b0f2b41f7e
wrapdb_version = 2.4.8-2
directory = expat-2.4.9
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_9/expat-2.4.9.tar.xz
source_filename = expat-2.4.9.tar.bz2
source_hash = 6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
patch_filename = expat_2.4.9-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.9-1/get_patch
patch_hash = 51b42d935008552f9d6c4d3e7511b84690a2a0c9d90165d1d192fc892f0a4787
wrapdb_version = 2.4.9-1
[provide]
expat = expat_dep

View File

@ -303,11 +303,6 @@ if curl_dep.found()
include_directories: inc,
dependencies: [
curl_dep,
# Explicitly linking with zlib here works around a linker
# failure on Windows, because our Windows CURL build is
# statically linked and thus declares no dependency on zlib
zlib_dep,
],
)