Commit Graph

17272 Commits

Author SHA1 Message Date
Max Kellermann
6857286b42 decoder/Thread: don't scan for replay gain tags in PCM streams
This disables a long delay for playing songs from the cdio_paranoia
input plugin if ReplayGain is enabled.
2022-07-08 16:33:19 +02:00
Max Kellermann
c0d5bd2048 decoder/Thread: move code to DecoderControl::LockIsReplayGainEnabled() 2022-07-08 16:21:53 +02:00
Max Kellermann
666e5d7904 input/CdioParanoia: use integer modulo to calculate "diff" 2022-07-08 16:04:05 +02:00
Max Kellermann
3613407ac5 input/CdioParanoia: use typedef lsn_t 2022-07-08 16:03:04 +02:00
Max Kellermann
c32dceb4d4 input/CdioParanoia: remove loop from Read()
The Read() method is not required to fill the whole buffer.  By
returning as soon as at least one byte was read, we allow faster
cancellation.
2022-07-08 16:01:23 +02:00
Max Kellermann
5573e78364 input/CdioParanoia: skip seek if seeking within the buffer 2022-07-08 13:57:11 +02:00
Max Kellermann
807a19889f input/CdioParanoia: update offset only after successful seek
If seeking fails, don't leave the class with a wrong offset.
2022-07-08 13:57:11 +02:00
Max Kellermann
df7242de91 input/CdioParanoia: eliminate redundant field "lsn_relofs" 2022-07-08 13:36:59 +02:00
Max Kellermann
d62426f168 input/CdioParanoia: eliminate redundant field "lsn_to"
Use "size" instead.
2022-07-08 12:42:49 +02:00
Max Kellermann
1714cf3417 input/CdioParanoia: use IsEof() in Read() 2022-07-08 12:42:42 +02:00
Max Kellermann
1080c917be input/CdioParanoia: use std::min() 2022-07-08 12:37:21 +02:00
Max Kellermann
8eb3164878 input/CdioParanoia: fix crash if no drive was found
cdio_get_devices_with_cap() can return nullptr if no drive was found,
or it can instead return an empty list.  The latter caused MPD to
crash.
2022-07-08 12:05:20 +02:00
Max Kellermann
915c5442d1 input/CdioParanoia: use AtScopeExit() for cdio_free_device_list() 2022-07-08 12:03:57 +02:00
Max Kellermann
be0360d5e8 doc/user.rst: clarify .mpdignore documentation
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1532
2022-07-08 11:44:14 +02:00
Max Kellermann
4d6ae6ffdd output/PipeWire: add nullptr check to SetVolume()
If the PipeWire output has not yet been enabled and no thread_loop has
been created yet, a nullptr dereference in SetVolume() was possible
because nullptr was passed to pw_thread_loop_lock().
2022-07-08 11:32:59 +02:00
Max Kellermann
ecee6f415b mixer/MixerInternal: remember error details
If a mixer is not open, rethrow the original exception each time
setting the volume is requested.  This further improves error messages
sent to MPD clients.
2022-07-08 11:11:53 +02:00
Max Kellermann
47680f936b mixer/All: auto-open "global" mixers
If a mixer is "global", it is available even if the output isn't
open.  However, since the check was changed from IsEnabled() to
IsReallyEnabled(), enabled outputs have not yet been used have not
been "really" enabled yet, preventing using the mixer.

Fixes a regression by commit 35dbc1a90c
(part of https://github.com/MusicPlayerDaemon/MPD/pull/1480).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1563
2022-07-08 11:05:26 +02:00
Max Kellermann
2d7181105d output/MultipleOutputs: SetVolume() throws on error
This reveals more about the nature of an error instead of just
returning "problems setting volume".
2022-07-08 10:56:55 +02:00
Max Kellermann
9bdc75524b python/build/libs.py: update CURL to 7.84.0 2022-07-08 10:13:52 +02:00
Max Kellermann
2f6ceb4949 python/build/libs.py: update OpenSSL to 3.0.5 2022-07-08 10:10:42 +02:00
Max Kellermann
cd933aa35f subprojects: update fmt and vorbis 2022-07-08 10:08:27 +02:00
Max Kellermann
138738075b libfmt 9 support
libfmt version 9 broke the API by removing fmt::make_args_checked().

Fixes https://bugs.debian.org/1014543
2022-07-08 10:06:53 +02:00
Max Kellermann
7dd65f3028 Merge branch 'v0.23.x' 2022-07-04 19:21:18 +02:00
Max Kellermann
2ee57f9b0d output/PipeWire: add nullptr check, fixing crash with PipeWire 0.3.53
Since PipeWire 0.3.53, control names can apparently be nulled, leading
to crashes in applications assertion that the string cannot be
nullptr.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1558
2022-07-04 19:20:08 +02:00
Max Kellermann
bc56f8c2f0 util/ConstBuffer: remove obsolete library
Everything has been migrated to std::span.
2022-07-04 19:15:10 +02:00
Max Kellermann
596ff7e6bf output/*: use std::span instead of ConstBuffer 2022-07-04 19:14:12 +02:00
Max Kellermann
e8667f99be util/OptionParser: use std::span instead of ConstBuffer 2022-07-04 19:04:16 +02:00
Max Kellermann
9b427b3171 command/*: use std::span instead of ConstBuffer 2022-07-04 18:58:13 +02:00
Max Kellermann
baff5e5594 lib/yajl: use std::span instead of ConstBuffer 2022-07-04 18:37:36 +02:00
Max Kellermann
020c9b41cc lib/icu: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
e975e2e477 lib/ffmpeg: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
4e1dc562f7 lib/curl: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
d097babe73 lib/chromaprint: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
8fa212f04d lib/cdio: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
b9c9a5f1dd db/*: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
4fb8b45111 song/Filter: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
6c107443d3 input/qobuz: include cleanup 2022-07-04 18:37:35 +02:00
Max Kellermann
67c6d111a8 filter/*: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Marceline Cramer
18ebd42c52
.github: Add reminder to include backtrace in issue template 2022-07-04 10:32:58 -06:00
Max Kellermann
9675cc77e2 decoder/*: use std::span instead of ConstBuffer 2022-07-04 18:11:21 +02:00
Max Kellermann
4ce1dae673 pcm/*: use std::span instead of ConstBuffer 2022-07-04 18:11:21 +02:00
Max Kellermann
d89136b09c util/ConstBuffer: hard-code std::span support 2022-07-04 18:09:32 +02:00
Max Kellermann
d58c38943a util/StringView: remove obsolete class
Everything has been migrated to std::string_view.
2022-07-04 15:04:31 +02:00
Max Kellermann
66704ec879 util/UriExtract: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann
422c1e9288 util/TemplateString: remove StringView support 2022-07-04 15:04:31 +02:00
Max Kellermann
683f0da2e7 tag/*: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann
c7a8fc91c0 storage/curl: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann
cfd255a014 lib/xiph: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann
1c30b3d5a1 lib/dbus/UDisks2: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00
Max Kellermann
4964eda167 fs/StandardDirectory: use std::string_view instead of StringView 2022-07-04 15:04:31 +02:00