Commit Graph

12708 Commits

Author SHA1 Message Date
Max Kellermann 4d102c4770 pcm/Dsd2Pcm: convert parameter to bool 2020-01-14 22:11:12 +01:00
Max Kellermann 91bc41ea20 pcm/Dsd2Pcm: add noexcept and remove extern 2020-01-14 22:11:12 +01:00
Max Kellermann e565dcf18c pcm/dsd2pcm: convert to C++ 2020-01-14 22:05:58 +01:00
Max Kellermann 5a87fc7c26 pcm/dsd2pcm: remove unused sources 2020-01-14 22:05:27 +01:00
Max Kellermann 64309abc14 Merge branch 'v0.21.x' 2020-01-14 22:04:55 +01:00
Max Kellermann b11c5f8d30 util/{Const,Writable}Buffer: drop more "_type" suffixes from type names 2020-01-12 14:39:54 +01:00
Max Kellermann af20a1c994 pulse: obey Pulse's maximum sample rate (fixes DSD128 playback)
Closes https://github.com/MusicPlayerDaemon/MPD/issues/708
2020-01-12 07:58:17 +01:00
Max Kellermann 44d7a1d8d2 pcm/Traits: drop "_type" from type names 2020-01-03 16:01:44 +01:00
Max Kellermann 4937d77cb6 util/{Const,Writable}Buffer: drop "_type" from type names
Behave like STL.
2020-01-03 15:55:06 +01:00
Max Kellermann 53f8053188 util/StringView: use using instead of typedef 2020-01-03 15:55:05 +01:00
Max Kellermann e654c6e005 util/{Const,Writable}Buffer: use std::size_t 2020-01-03 15:55:05 +01:00
Max Kellermann 4b0e288f00 util/{Const,Writable}Buffer: add noexcept 2020-01-03 15:55:05 +01:00
Max Kellermann 71ace2fbac util/AllocatedString: use std::exchange() 2020-01-03 15:54:51 +01:00
Max Kellermann fb450d2f41 Merge branch 'fix_cue_in_playlist' of git://github.com/maxmitti/MPD 2020-01-03 15:31:37 +01:00
Max Kellermann 84784badce Merge branch 'v0.21.x' 2020-01-03 15:31:18 +01:00
Max Kellermann 5990e46de2 lib/xiph/meson.build: exclude VorbisComments.cxx if the Vorbis decoder is disabled
Fixes a build failure.
2020-01-02 13:01:38 +01:00
Markus Mittendrein 7dea5db5df playlist/PlaylistSong: also copy start and end time in merge_song_metadata
This is needed to correctly load playlist entries that reference a song in a cuesheet that is treated as a folder.
2020-01-01 22:20:39 +01:00
Jacob Vosmaer dca0519336 Clang: only use [[fallthrough]] in C++ files
It appears that [[fallthrough]] is valid in C++ but not in C. And
in some Clang versions (e.g. Clang 11 on macOS), Clang is pedantic
about this and considers it an error to use [[fallthrough]] in a
.c file such as src/util/format.c.

This changes makes gcc_fallthrough a no-op under Clang in C files.
2019-12-31 13:54:09 +01:00
Max Kellermann 803a48e96d Merge tag 'v0.21.18'
release v0.21.18
2019-12-24 16:31:06 +01:00
Max Kellermann d27e534a85 time/ISO8601: fix Windows build failure
Caused by 2bc127bb43
2019-12-24 16:12:52 +01:00
Max Kellermann 6d54928d7c Revert "lib/curl/Global: remove lower bound on timeouts"
This reverts commit 4475b8ca04.  Further
testing revealed that the threaded resolver still uses a timeout of
0ms.  This revert however lowers the bound to a minimum of 1ms instead
of 10ms.
2019-12-24 16:09:26 +01:00
Max Kellermann 0dffe05bf7 input/curl: remove unnecessary InvalidateSockets() call
Like fe598e7d30
2019-12-24 11:41:52 +01:00
Max Kellermann 744bd1eadc time/ISO8601: refactor ParseTimeOfDay() to parse one by one
This prepares the migration away from strptime() for Windows
portability.

But the real reason I'm doing this is that strptime() on Apple is
buggy: strptime("14", "%H%M%S") (without separating colons) succeeds
even though only the hour has been parsed.  This fixes recent Travis
failures in the ParseISO8601() unit test.
2019-12-24 10:15:03 +01:00
Max Kellermann 2bc127bb43 time/ISO8601: move code to ParseTimeOfDay() 2019-12-24 10:15:01 +01:00
Max Kellermann 7770298a65 util/Compiler.h: use [[fallthrough]] on clang
Older clang versions don't support the GCC __attribute__ syntax.  For
those, don't use anything at all, and new clang versions shall use the
standard syntax.
2019-12-24 08:04:48 +01:00
Max Kellermann a1afe9afc6 util/Compiler.h: add gcc_fallthrough
Works around build failures with ccache which may feed processed code
to GCC, which doesn't have the "fall through" code comments.
2019-12-23 17:53:57 +01:00
Max Kellermann fe598e7d30 lib/curl/Global: remove InvalidateSockets() call from Remove()
curl_multi_remove_handle() calls our socket function, and there's no
need to call curl_multi_socket_action().
2019-12-23 14:52:46 +01:00
Max Kellermann 4475b8ca04 lib/curl/Global: remove lower bound on timeouts
This was a problem 9 years ago, and apparently, it has been fixed long
ago.
2019-12-23 14:50:51 +01:00
Max Kellermann a714bdb0ce lib/curl: drop support for CURL versions older than 7.32.0
For simplicity, this commit removes a workaround for an old CURL bug.
2019-12-23 14:41:06 +01:00
Max Kellermann f1116c9258 event/Loop: remove bogus assertion
Can fail if somebody calls Break().
2019-12-23 14:20:09 +01:00
Max Kellermann d01fb6730a storage/curl: move start call out of the constructor
This can cause request completion in the I/O thread before this
constructor returns, leaving the object in an abstract state, causing
a crash due to pure virtual method call.  We should not start the
request until this object is fully constructed.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/665
2019-12-23 13:37:58 +01:00
Max Kellermann 57b8e7f651 Merge branch 'jv-cache-manager' of git://github.com/jacobvosmaer/MPD
Works around assertion failure in the boost::intrusive::set class
because we modified the container between insert_check() and
insert_commit().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/691
2019-12-22 12:17:13 +01:00
Max Kellermann 9a577f8060 event/MultiSocketMonitor: add workaround for /dev/null
The ALSA "null" driver opens /dev/null and returns the file handle
from snd_pcm_poll_descriptors(), but /dev/null cannot be used with
epoll, the epoll_ctl() system call returns -EPERM.  This means that
the ALSA output hangs, eventually freezing the whole MPD process.

This commit adds a workaround to the MultiSocketMonitor class which is
used by the ALSA output plugin.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/695
2019-12-22 12:08:44 +01:00
Max Kellermann d75a0d714e event/MultiSocketMonitor: remove unnecessary friend declaration 2019-12-22 12:08:44 +01:00
Max Kellermann 9be3a1554e event/MultiSocketMonitor: remove duplicate IdleMonitor::Schedule() call
SetReady() does this already.
2019-12-22 12:08:10 +01:00
Max Kellermann 7764719513 event/MultiSocketMonitor: un-inline AddSocket() 2019-12-22 12:00:12 +01:00
Max Kellermann dcbb9fe07c event/Loop: round timeout up to avoid unnecessary wakeups 2019-12-22 11:58:31 +01:00
Max Kellermann e3b347820a event/MultiSocketMonitor: use std::exchange() 2019-12-20 13:42:35 +01:00
Jacob Vosmaer 83acbe1002 input/cache: use simpler intrusive::set API 2019-12-18 23:15:46 +01:00
Max Kellermann a84bf5a92e event/MultiSocketMonitor: AddSocket() returns bool 2019-12-18 17:50:21 +01:00
Max Kellermann 732bdc800d event/SocketMonitor: Schedule() returns bool 2019-12-18 17:46:33 +01:00
Max Kellermann a72878c5b9 io/FileDescriptor: add method FullRead() 2019-12-17 20:21:11 +01:00
Max Kellermann bd4df1ae5d util/AllocatedArray: add WritableBuffer/ConstBuffer cast operators 2019-12-17 20:18:54 +01:00
Max Kellermann a93b7172aa util/AllocatedArray: add ConstBuffer copy constructor 2019-12-17 20:18:49 +01:00
Max Kellermann 908b6a1939 util/AllocatedArray: use WritableBuffer::operator[] 2019-12-17 20:18:45 +01:00
Max Kellermann 561ccf600f util/AllocatedArray: remove bogus assertions
`new T[0]` must not be nullptr.
2019-12-17 20:18:39 +01:00
Max Kellermann aee861c009 util/AllocatedArray: copy constructor copies "nulled" state 2019-12-17 20:18:34 +01:00
Max Kellermann 2cc1dd28cd util/AllocatedArray: add capacity()
For STL completeness.
2019-12-17 20:18:24 +01:00
Max Kellermann f8d7bc1c34 util/AllocatedArray: use std::exchange() 2019-12-17 20:18:14 +01:00
Max Kellermann a684b4fff1 lib/dbus/UDisks2: add missing <stdexcept> include 2019-12-16 23:50:01 +01:00