Commit Graph

2207 Commits

Author SHA1 Message Date
Max Kellermann 79f9b268bb increment version number to 0.23.9 2022-07-12 11:50:47 +02:00
Max Kellermann 349882ed75 decoder/wavpack: require libwavpack version 5 2022-07-11 22:04:15 +02:00
Max Kellermann 4464310e74 release v0.23.8
-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmLIuEINHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEm1JD/9j/a82cNccPLUfTptgb8ak5fAnYA65edbtGPr9
 dLv1BSjMrsTpMpgJ8FT5wjQn7H5drmE2GLvCN+oZUqaSz99F5BC+Hof7bfvv/sVF
 opLTiZn2iAtanwtHP6ZEPPswTbdN2FgtZeFhJIGmFspghJV5hdbM7vbwNX1SIpc6
 LH+WvE42ZG/w5wNajRvr6/lPYQhJc70wUqODXLzgdYu3WYmIclUAyFv7tVr067Hh
 uXP6b6MZV60cqh+a0xX01n5kwDo2reqmmE0IY0Le7H6xg5quE7DzCVElTOAa7R1x
 MZJCqY/thjvXl3JfHW5/ZwmiNrxsmx8nzGhrDyg4tb3hjbwip1iEI/OgnDyacdl4
 34njeFxO40AJhienDWLAp2oSYh4pNdfjFvnfSJXeQ9HD2sIzGi692WUgzjdM1VmA
 83iVRe9Bx4OTyAg1jwPOFyAYnRqhWsYFSp7GjwNBQwTRSwwBtmOxwAhWKwuspuLi
 YfDoF7wGYVY5lOXuDBw+rvhGRWqGKsbQzZFy0bQFoD8dbwG9huLJCumNWZCbqELF
 TAfU5sRcQlAjwSGncEpKOitYjdrtylYRb12p2DSedFuBWxcRGGPiCFfTVUKV8hz1
 LGD1xj1g/4ClEUbfDNVwa7sAEO7o84Qojfkt/siBjhE427i11CpPGIlMCVeO2FkG
 fI1f3Q==
 =KgWM
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.8'

release v0.23.8
2022-07-09 01:08:16 +02:00
Max Kellermann 1f28790476 release v0.23.8 2022-07-09 01:05:38 +02:00
Max Kellermann c8dae95eff output/PipeWire: after Cancel(), refill buffer before resuming playback
Deactivate the stream in Cancel().  This fixes stuttering after a
manual song change by refilling the whole ring buffer before
reactivating the stream.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:03:36 +02:00
Max Kellermann 547a084c7e output/PipeWire: call pw_stream_flush() in Cancel()
Clear not only MPD's ring buffer, but also libpipewire's buffers, to
avoid playing some audio from the previous song after a manual song
change.

Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:01:29 +02:00
Max Kellermann 6b430ba271 output/PipeWire: activate stream in Drain() 2022-07-09 00:53:20 +02:00
Max Kellermann bc6924d303 output/snapcast: fix busy loop while paused
Removing the LockHasClients(); this code was copied from the "httpd"
output plugin, but unlike "httpd", the SnapCast output plugin does not
feed silence while paused, so we need to implement a delay to avoid
busy-looping the CPU.

As a side effect, this eliminates the suttering after resuming
playback, because the timer now gets reset even if there is a client.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1394
2022-07-08 22:55:41 +02:00
Max Kellermann 02b00f9146 output/PipeWire: don't force initial volume=100%
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1484
2022-07-08 18:25:41 +02:00
Max Kellermann f08944253b output/PipeWire: check SPA_PROP_channelVolumes, not control name
Since PipeWire 0.3.53, there is no control name anymore, therefore the
name check doesn't work anymore, breaking volume change events.

This obsoletes the crash bug fix in commit 2ee57f9b0d
2022-07-08 18:06:36 +02:00
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 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 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 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 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 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 af951dc08a Merge branch 'v0.23.x' 2022-07-01 12:45:07 +02:00
Max Kellermann 5a5655b790 lib/curl/Adapter: catch and postpone exceptions in WriteFunction()
This fixes a std::terminate() crash in the CURL storage plugin when
PropfindOperation::OnHeaders() throws an exception after receiving a
non-207 status.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1559
2022-07-01 12:43:42 +02:00
Max Kellermann 3bb7693200 decoder/HybridDsd: remove
This is a proprietary extension which nobody appears to use.
2022-05-20 10:08:17 +02:00
Max Kellermann 0e9e213324 meson.build: switch to C++20 2022-05-19 09:46:59 +02:00
Max Kellermann 86e6f4fcc0 Merge branch 'v0.23.x' 2022-05-19 09:27:06 +02:00
Max Kellermann 122db76781 release v0.23.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmJ5gd4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEi1vD/9mcxGKnkx4yTDJZhtSWfsSE/5v+oFu09Qy
 Uk5ggk6PN18hMFZ2mcVYXdh7Yc1QiiAycgVFnchiVMYaF+K3LXefXvtkn81xuUNN
 QnJLX/o2hbnmr5Or/Ps+hgiQ0PEn0ui1+t70jJ8a3Ad9sJy3YFQc/HjLUeOZqT0p
 4qVyp614TtjtPlw/q0GHgiD1BxpH/pbcdMvioGj80MwBlwyrvA5IlV4HxxAAervw
 4KKT9XbtnHzR+fyUPv633CDU/bWNkTgbpMVyEhRXxE3heNaXMC4wSfsD/5XKDYLb
 zt/q1pAj6totKJwgdm76MoOKuVeNvw54jBE7st46+lPoH97h5uN9rpEAk00dXtSA
 2FuOw8bc79uN5ZRsWXJ6ZBWzwUvssAtx9ee2seR9BUpdeSGurdOfkKq0h/c/aUzN
 Qn6oWX75e7fMAB9MZhdCpM8lC0Nm5l9il+pA9811qaeZLO6yveW6by2Hmbo6BU0Q
 3MQKyhXJkLFAOwPR9qMAtr3rQ/Wyl4WsJ/kXIYBu7I7HjOxSHjNnZOMsvcLfCMC9
 dcRmtHOPjuVbafiypZ88SekIS0U+deXg33mKaWhH7FrCFEFbXf6GTBzXh/hHKtBm
 icGTwGoOHX53fTgQ9GwC0XBpVBFbY5/gGr2KuzABecU2TeL3QqLl8tolsnBGVYun
 JJ9n+RP0dQ==
 =iQJC
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.7'

release v0.23.7
2022-05-09 23:14:07 +02:00
Max Kellermann 106ad08cd2 increment version number to 0.23.8 2022-05-09 23:12:17 +02:00
Max Kellermann 0341ca1b6a release v0.23.7 2022-05-09 23:04:30 +02:00
Max Kellermann 112fcd206d Merge branch 'fix-hls-seeking' of https://github.com/burrocargado/MPD into v0.23.x 2022-05-09 22:44:53 +02:00
Max Kellermann ce88dee14d Merge branch 'v0.23.x' 2022-04-26 18:30:34 +02:00
Rosen Penev 50d35c9677 upnp: use UpnpInit2 always
libupnp 1.14 removes the non 2 function. Fixes compilation there.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1499
2022-04-26 17:57:48 +02:00
Arsen Arsenović c7a4355153 outputs/pipewire: fix ParamChanged incorrectly setting volume
Previous versions of MPD would, on parameter change, set the PipeWire
volume before clearing the restore_volume flag, causing the call to
short circuit and do nothing. Instead, clear the flag before the call.
2022-04-26 17:44:19 +02:00
Max Kellermann c779fc37eb output/shout: declare minimum version 2.4.0
This version was released 7 years ago, and it's reasonable to require
at least this version.
2022-04-26 16:46:36 +02:00
Max Kellermann 3929f17aef NEWS: mention the libiconv fix 2022-04-26 15:56:54 +02:00
Max Kellermann a360475c7b Merge branch 'v0.23.x' 2022-03-26 06:49:51 +01:00
Vitaly Ostrosablin ac06088948 Make volume changes to apply to disabled software mixers.
Move audio output state check ahead of mixer check and force volume
applying even for disabled software mixed outputs.

This fixes incorrect software mixer volume that used to occur when
volume was changed while output being disabled.

This is easily reproduced with following sequence of commands on
multi-output software mixed MPD setup.

 mpc volume 38; mpc disable 3; mpc volume 88; mpc enable 3

On current MPD, following commands would result in output 3 playing at
volume 38, while all other enabled outputs would play at volume
88. Moreover, global volume would display average of outputs real
volumes. In my case, it's 75.

After applying this patch, following commands would produce expected
behavior. All outputs play at expected (88) volume. And volume is
correctly displayed as 88.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1423

Signed-off-by: Vitaly Ostrosablin tmp6154@yandex.ru


Signed-off-by: Vitaly Ostrosablin <tmp6154@yandex.ru>
2022-03-26 06:29:18 +01:00
Max Kellermann a757eebfbb decoder/OggSyncState: allow skipping up to 64 kB after seek
This is more of what we did in commit 70bd35abe2 because it turns
out there are Ogg-Opus files with pages larger than 40 kB.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1487
2022-03-16 16:54:50 +01:00
Tim Sweet 3a3f605a56 decoder/opus: Implement bitrate calculation 2022-03-15 10:34:23 +01:00
Max Kellermann 407fa2720a release v0.23.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmIvgaMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEpzhEACOJOyOjtmeuu7Uc147O4YzL/7g5PEZMKHI
 yB/H2QOWnbgAKh+8AFT2YudR89mIXslfuIILRg8/NYkEFgNCrkBQETWsATPyqrCr
 rYJxPtjlC2fAlKkl9XM+qL1WMATIhvRVD9SZajZKwa+9H1y5mZGlMBWdzdxaJoUY
 bhlu7fYvyRMXsStUncyYfsKsuHyibq3d4Pk/jegZhJeMI9/MOKdjc9GJE6Rzz0cT
 dWGqpfBJ/WMZ9aKXB3fh7WVtiIl/hr/5K1QizL10pwmJ5o/LBNKk7eEREbPUvNc6
 S5BHBOyVYaqVTGZyaoF9XkMKv7qnKYNoD2g2H+J5cN87rMRI8DzY/MqUxmX0bCGc
 jOQinMcQuL7zMvYx0ypKdTiMas2OG/RlKluOgzhNIvzkWYCxh9iCozm7Wl3qsvY5
 uJEsaeIb/zgSmUC2637ltBE37lW/8m7RYWpuq82M2CnFx9oL6W3ah8SMm5ToBzYB
 jHrN7h+YcKoIrFcZsYVTCbLzGQnQ2kmzsyGecDeCK9aP16gTkALZdpexn0oIzEKv
 fNtNSU7MgYXLs0knrcBoQw0nQnH9ICuswqFiyr4jcFfqxbIw9mvHyLRIWnyhL9zj
 XiYEr3SqnuVnmuLSgHlYk6g4zpYFLJEHo+/7IlEqTItXeAcsIhjn6B/NDyKVvYQa
 Pfb1ORoumQ==
 =jMu8
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.6'

release v0.23.6
2022-03-14 18:58:47 +01:00
Max Kellermann 4a5c7d8261 increment version number to 0.23.7 2022-03-14 18:55:55 +01:00
Max Kellermann f591193dda release v0.23.6 2022-03-14 18:55:47 +01:00
Max Kellermann 2aed7378cc TagAny: support CUE tracks
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1482
2022-03-14 18:42:31 +01:00
Richard Schorrig aeaef85507 WasapiOutputPlugin pause bug fix
Wasapi output plugin won't start playing after being paused

The cause is that the scope guard in the WASAPI work thread
(WasapiOutputPlugin.cxx, function WasapiOutputThread::Work(), in the
while (true) loop) is set up too 'late' in the execution. There is one
condition ("if (data_in_frames >= buffer_size_in_frames)") when it is
hit, the loop will continue without executing the scope guard. This
scope guard is responsible for emptying the buffer again, and if the
buffer is not emptied, the above mentioned condition will stay true.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1451
2022-03-14 14:26:00 +01:00
jcorporation 5ad1a01d7a Remove bmp, tiff and add webp for coverimage filenames
- supporting bmp and tiff seems outdated
- webp is more widely used for coverimages
2022-03-14 14:09:23 +01:00
Max Kellermann 8f84e1befd decoder/plugins/FfmpegIo: return AVERROR_EOF at end of file
This part of the AVIOContext API is not documented :-(

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1448
2022-03-14 14:00:28 +01:00
Max Kellermann 9975905faf output/PipeWire: initialize field "stream" in Open()
Must be initialized for the check in SetVolume().
2022-03-09 14:29:46 +01:00
Max Kellermann fdc0329e64 archive/List: add option to disable archive plugins in mpd.conf
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1384
2022-02-14 17:54:21 +01:00
Max Kellermann 2172aaf1ce song/PrioritySongFilter: new filter
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1412
2022-02-14 14:06:37 +01:00
Max Kellermann c3be961ccf queue/Print: implement sorting 2022-02-14 13:07:13 +01:00
Max Kellermann 11d24a583d command/queue: "playlistfind"/"playlistsearch" have a "window" parameter 2022-02-14 09:12:19 +01:00
Max Kellermann ad4cf79cc9 tag: new tag "Mood"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1435
2022-02-12 07:50:18 +01:00
Max Kellermann 946cf25732 Merge branch 'v0.23.x' 2022-01-26 14:44:37 +01:00
Max Kellermann 86e9ed5f3a decoder/opus: fix "readpicture" on Opus files
Don't return early from ScanOpusTags() if only
TagHandler::WantPicture() is set.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1413
2022-01-26 14:43:45 +01:00
Max Kellermann 35c11afd54 player/Thread: add option "mixramp_analyzer" 2021-12-06 23:06:08 +01:00
Max Kellermann 2384a240e0 increment version number to 0.24 2021-12-03 23:01:43 +01:00
Max Kellermann e25e0030e7 increment version number to 0.23.6 2021-12-01 20:01:22 +01:00
Max Kellermann df4b6b92f2 release v0.23.5 2021-12-01 20:00:00 +01:00
Max Kellermann 16fb843c9b tag/MixRamp: fix typo which broken MixRamp
Fixes regression by commit 8e0d810968 which is 2 years old, and nobody
noticed.  D'oh, how embarassing!
2021-12-01 15:46:31 +01:00
Max Kellermann 933a1a41e6 lib/upnp/Discovery: use InjectEvent instead of DeferEvent
Fixes regression by commit 774b4313f2
2021-11-30 18:03:27 +01:00
Max Kellermann 4682ae0898 command/database: support relative offsets for "searchadd"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1337
2021-11-23 12:17:32 +01:00
Max Kellermann dcb5ca203c db/DatabasePlaylist: increment only one variable
Fixes "searchaddpl" bug emitting bogus error "Bad position".

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1338
2021-11-22 20:47:34 +01:00
Max Kellermann 77df5a8f24 lib/pcre: migrate to PCRE2
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1352
2021-11-22 19:32:45 +01:00
Max Kellermann eea2d35d3a util/AllocatedString, ...: add missing include for std::exchange()
Fixes building with GCC 12.
2021-11-19 16:06:20 +01:00
Max Kellermann 16feb261e2 increment version number to 0.23.5 2021-11-11 10:18:19 +01:00
Max Kellermann f084bf7872 release v0.23.4 2021-11-11 10:16:36 +01:00
Max Kellermann 1112d3907a Revert "systemd: add "RuntimeDirectory" directive"
This reverts commit 552c30eae4.

It has caused various problems; for example, MPD wasn't able to write
the pid_file (which was already mitigated by commit a4e4217204).

And apparently, the socket file created in the same directory by
mpd.socket disappears when mpd.service (re)creates the directory.  I
could not reproduce this problem with 247.3, but maybe this is a bug
in older systemd versions?

Until we figure out why this happens, let's remove the
RuntimeDirectory directive.  A future MPD version may be launched as
regular user, not as root, which will eliminate one major problem with
RuntimeDirectory.
2021-11-11 10:16:13 +01:00
Max Kellermann 3464497880 command/database: add optional position parameter to "searchaddpl"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1328
2021-11-11 09:52:49 +01:00
Max Kellermann 5f4ec7de5b decoder/ffmpeg, lib/ffmpeg: make AVCodec pointers "const"
For libavcodec 59 support.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1333
2021-11-09 21:09:14 +01:00
Max Kellermann c93195c94b NEWS: fix typo 2021-11-05 14:45:43 +01:00
Max Kellermann a4e4217204 Main: ignore the "pid_file" setting if started as systemd service
Commit 552c30eae caused problems for those people who still had a
"pid_file" setting (even though that is obsolete with systemd),
because now /run/mpd is owned by root:root (our mpd.service has no
User=mpd directive, so systemd starts MPD as root).

To work around this problem, and to be able to keep
RuntimeDirectory=mpd (which solved a problem of other MPD users), the
best compromise seems to just ignore the "pid_file" setting when it is
of no use.
2021-11-05 09:02:56 +01:00
Max Kellermann be3eca39e8 NEWS: add missing lines 2021-11-04 17:59:02 +01:00
Max Kellermann 14b3c0f0af event/Loop: destruct the Uring::Manager in the destructor before assert()
Fixes assertion failure when the EventLoop gets destructed before
Run() was ever called.

Fixes https://bugs.debian.org/998310
2021-11-03 18:32:14 +01:00
Max Kellermann 67aff05051 increment version number to 0.23.4 2021-10-31 18:17:35 +01:00
Max Kellermann 19a101c3ac release v0.23.3 2021-10-31 18:13:10 +01:00
Max Kellermann 03f99dd26e db/update/Walk: use GetFilenameSuffix() instead of uri_get_suffix()
Unlike GetFilenameSuffix(), uri_get_suffix() removes the query string
first, which breaks file names with question marks in the name.
Therefore, uri_get_suffix() shall only be applied to remote URIs.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1316
2021-10-31 13:18:24 +01:00
Max Kellermann bfb1b641f9 db/update/InotifyUpdate: fix use-after-free bug
Regression by commit 2d8847f428
2021-10-28 13:39:38 +02:00
Max Kellermann 552c30eae4 systemd: add "RuntimeDirectory" directive 2021-10-26 08:38:36 +02:00
Max Kellermann 48e8a26813 command/playlist: allow range in playlistdelete 2021-10-25 12:23:37 +02:00
Max Kellermann a6173e0eae command/playlist: add position parameter to "playlistadd"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1106
2021-10-25 12:10:47 +02:00
Max Kellermann 6f595e9abb command/queue: add optional position parameter to "add"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1285
2021-10-23 13:12:44 +02:00
Max Kellermann c8121176b3 output/alsa: add option "stop_dsd_silence" to work around DSD DAC noise 2021-10-23 12:25:32 +02:00
Max Kellermann ee270f9b00 meson.build: log_dep is only needed internally 2021-10-23 12:08:43 +02:00
Max Kellermann 3cb44f6652 increment version number to 0.23.3 2021-10-22 12:50:11 +02:00
Max Kellermann b7fdff46f2 release v0.23.2 2021-10-22 12:45:45 +02:00
Max Kellermann e16109330d input/last: clear "uri" in OnCloseTimer()
Without clearing the "uri" field, the next Open() call attempts to
reuse the old InputStream, but it has already been closed, so Open()
always returns nullptr.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1300
2021-10-22 12:45:18 +02:00
Max Kellermann 0c4bf12bfd player/CrossFade: fix inverted check and wrong variable
The inverted check was introduced by commit 46d00dd85f, and commit
8ad17d25ef added a check for the wrong variable.  D'oh!

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1303
2021-10-22 11:49:38 +02:00
Max Kellermann 32851d1bc7 output/pipewire: DSD support
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1297
2021-10-20 11:39:54 +02:00
Max Kellermann 5fab107fd3 lib/nfs/FileReader: use the thread-safe InjectEvent
.. instead of DeferEvent, which is not thread-safe.  This caused
various playback problems, which was initially caused by the
DeferEvent/InjectEvent split in commit 774b4313f2

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1298
2021-10-20 09:38:09 +02:00
Max Kellermann 80b09360c6 NEWS: mention the previous commit 2021-10-19 14:38:37 +02:00
Max Kellermann fd5a3b5880 client/Response: reimplement Error() without FmtError()
With libfmt versions older than 7, this leads to an endless recursion
between Error() and FmtError(), resulting in a crash due to stack
overflow.  D'oh!

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1295
2021-10-19 13:40:11 +02:00
Max Kellermann a8087dc12c neighbor/Glue: mention failed plugin name in error message 2021-10-19 13:29:00 +02:00
Max Kellermann 0a9bec3754 increment version number to 0.23.2 2021-10-19 10:29:49 +02:00
Max Kellermann fff25ac753 release v0.23.1 2021-10-19 10:27:28 +02:00
Max Kellermann 4f1e79b6b8 filter/ReplayGain: emit "mixer" event when replay gain changes volume
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1294
2021-10-19 10:03:21 +02:00
Max Kellermann df033fa4aa NEWS: mention the previous commit 2021-10-19 08:56:32 +02:00
Max Kellermann 31151cec3c command/playlist: "load" supports relative positions
This commit also increases the PROTOCOL_VERSION so clients can detect
the availability of the feature.
2021-10-18 22:08:22 +02:00
Max Kellermann b22d7218aa command/player, ...: use decimal notation
During the libfmt migration, I converted "%1.3f" to just "{:1.3}"
without the "f" suffix, but libfmt defaults to scientific notation,
which can break some MPD clients.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1291
2021-10-18 16:54:53 +02:00
Max Kellermann d5be8c74b0 output/pipewire: attempt to change the graph sample rate
Requires PipeWire 0.3.32.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1283
2021-10-18 16:46:23 +02:00
Max Kellermann c112cb60da output/snapcast: fix typo which caused "Failed to get chunk"
This bug caused a 9 second offset in all time stamps.  Due to that,
the Snapcast server thought the chunks are too old and discarded them.

Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1287
2021-10-18 16:40:11 +02:00
Max Kellermann 907af2ad02 Permission: refactor getPermissionFromPassword() to return std::optional
This replaces the output parameter (which is bad API design).  As a
side effect, it fixes the bad [[gnu::pure]] attribute added by commit
a636d2127 which caused optimizing compilers to miscompile calls to
that function.  "Pure" functions can be assumed to have no output
arguments, so the compiler can assume the function doesn't modify
them.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1282
2021-10-17 19:58:50 +02:00
Max Kellermann 771c46032f meson.build: add missing libfmt dependencies
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1281

The problem occurred when there was libfmt-dev installed, but it was
too old (e.g. on Debian Buster), and Meson used the wrap fallback.
Those internal MPD libraries where the libfmt dependency was not
declared were still using the old system libfmt headers, which are not
ABI-compatible with MPD's own libfmt build.
2021-10-15 14:26:59 +02:00
Max Kellermann 781fe4ff28 increment version number to 0.23.1 2021-10-14 15:36:16 +02:00
Max Kellermann 163c59128e release v0.23 2021-10-14 15:25:21 +02:00
Max Kellermann 608896571c command/queue: add position parameter to "load"
Another one from https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:11:11 +02:00
Max Kellermann 2e5ca1cbd2 command/database: add "position" parameter to "findadd" and "searchadd"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:03:02 +02:00
Max Kellermann 77d74b404e Permission: add option "host_permissions"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1115
2021-10-14 14:44:18 +02:00
Max Kellermann 9a766f4cd9 Permission: split permission "player" from "control"
Some users want certain clients to fully control playback, but do not
want them to be able to trigger database update.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1124
2021-10-14 14:19:51 +02:00
Max Kellermann 8ad17d25ef player/CrossFade: do not cross-fade songs shorter than 20 seconds
From the feature request: "I generally like to have crossfade on, but
when it happens during such short tracks (e.g. 20 seconds or less) it
doesn't really sound good as those tracks are not really meant to be
crossfaded and intended to act as a bridge on their own."

Sounds reasonable.  This commit doesn't add an option, but hard-codes
the limit to 20 seconds.  If it turns out that users want to have it
configurable, we can still add the option.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1184
2021-10-14 13:47:24 +02:00
Max Kellermann 37bd6de658 db/simple: add option to hide CUE target songs
This reduces duplicates in the music database by hiding the original
song file when it is referenced by a CUE sheet.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1275
2021-10-14 13:28:37 +02:00
Max Kellermann 0712314d23 archive/{zzip,iso9660}: ignore file names which are invalid UTF-8
These malformed strings must not be transferred over the wire, because
the MPD protocol is defined to be UTF-8.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1274
2021-10-13 15:51:08 +02:00
Max Kellermann a49b49cba7 decoder/wavpack: fix WVC file support
The wrong variable was used.  This has been broken by commit
4eeea640f4 seven years ago - and nobody as noticed, d'oh!
2021-10-13 12:11:39 +02:00
Max Kellermann c0bcfe244c command/QueueCommands: reimplement relative "move"/"moveid" offsets
The existing implementation has been utterly broken forever; I cannot
explain what it actually does, but it doesn't do what the
documentation says.
2021-10-07 22:49:38 +02:00
Max Kellermann 3993176b76 command/QueueCommands: support relative offsets in "addid"
A similar feature was present long ago in MPD, but was deprecated in
version 0.16 because the implementation was broken.  This commit
re-adds the feature in a way that's well-defined and not broken.

Close https://github.com/MusicPlayerDaemon/MPD/issues/1221
2021-10-07 21:55:56 +02:00
Max Kellermann cf554d306d LocateUri: implement UriPluginKind::STORAGE properly
This way, URI schemes supported by arbitrary storage plugins are
allowed.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1270
2021-10-06 20:36:39 +02:00
Max Kellermann 8a29805767 release v0.22.11
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmElU1oQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnfUD/0fmlPB0ud6UdyedOp6yqbZoWvUanGFyrFX
 4eaTfSZq4qAs3JKSLqGVcseDNG4wk/VkDhXekbpFPIgCjBQpypxusQ1NowoT6gps
 NYFClU2cxBnGYHMZQeTT+4WB4VRGreZGJ42IfQbKDyrSNImKu+5CmtDvsoGezeMK
 OnL9EkNR3D7nl6uIUstuyOG6f/x1QNNVlntatslMxPYfnrZgHElwZiodqEGDh0c4
 XxBQmVyAX+AGjmwepXTQvUap2rd2x0mW7jQ7C3FFTP/eSImPsspQb4zO/TGnp3/o
 9pSIDUSlnOS78C3GIJCZB4ac7i/Gh+tSV6Y3wSJmY9s/EvqnnHwySeiJnTLG3q3G
 03Wy7r64enytU3jdgjtYb3h8fCnsQjhuhmUXtDLTF3hFeBR/EkviYQOpGqVbXpzm
 Wx+yINtHJcUr4jikxboFSQacmf2WbJbIyZ3RhsWTWANHWDqHrMzW73E850Dg3kg3
 RoeMKV3B9vFv6kolsCZR/Pq6+vFSsuDt8o+/RJqBwSKKwPP9Hm7ntlamTsJ5kA/0
 kvr5WE9RcDOU+lyTjra1OW7OInxbhr05PFNBw8GfeR9QyatUT6c3hgyhoCbZ24DV
 oPh3TwKrwtm82TMxBktGMAWb02RebEYVpPSlVrnWhpI9vlm4gHebAxANbFVWA/ur
 FxQv+PXg0w==
 =G8gT
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.11'

release v0.22.11
2021-08-24 22:19:38 +02:00
Max Kellermann 94c196108d release v0.22.11 2021-08-24 22:15:22 +02:00
Max Kellermann 263d1ba002 Main: playlist_directory defaults to "/sdcard/Android/data/org.musicpd/files/playlists"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1233
2021-08-24 22:12:27 +02:00
Max Kellermann 8439119e24 filter/ffmpeg: support double-precision samples
Insert an "aformat" filter which converts double-precision to
single-precision.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:45:57 +02:00
Max Kellermann b5b40d8235 filter/ffmpeg: automatically retry with "aformat"
If DetectFilterOutputFormat() fails to determine the output format,
insert an "aformat" filter which attempts to force a specific output
format.

Fixes part 2 of of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:31:13 +02:00
Max Kellermann ca2439f595 filter/ffmpeg: pass "channel_layout" instead of "channels" to buffersrc
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-23 21:38:13 +02:00
Max Kellermann f9a0db716a android: build with NDK r23 2021-08-23 20:58:19 +02:00
Samir Benmendil cfe024ea13 command/file: return directory_uri if real_uri is unset
Prevent a segfault when accessing album art.

Fix #1224 #1225
2021-08-17 10:55:43 +02:00
Max Kellermann 993d85125e increment version number to 0.22.11 2021-08-17 10:55:10 +02:00
Max Kellermann bd893e6336 release v0.22.10
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmENYHwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEpGtD/9ToU27x36NAAFpChicSqbu3h2wtJ29lowT
 ivV80XB26pQeGK0DSXADSs38MVXo42i3vqg0zGWV9TRbcDs5VErXANVLN16qsKCu
 U0v1BDY11UiYp6ATiUjIahyG1UsmbRVZlfDyVIhYvmFpGLFw6+03HH6w2k/v85ns
 FxyXkYDYcUokPJPEQcChE1eIwKsGM6MjbdVIkJAEo3wGhL/Hhy2KUskrFcCo1PDj
 7xxGrwauG+8wSjAWMA5vzl3udRaDauuXztm5QbQIDdsbRaCiBAdgkzC0PvIxTOr0
 bR4WHVB0KSiM96yIXNtg/WZxO0XrxppmX/E4eZSgz0JGKMrAHcoTJAUCIDu3X719
 gJnJLg7r2X5dTchXezv09YoJolKbw1bOooyAuE4FCDWMsOa2GRuBZC+8w7DNTZuo
 PTh+Z40fnfpNBofe+e/WZrXr6i2TKk8CqHEidq2GHlOkvTR7g6m8MjOLvZNHotMb
 9ECr9MhzXH+nvEX8IaxvjWsfLJiDbUgnVsQ+6akGtkbragaDN/Wgr/XdkELoLlsK
 LZFY5ngnZmDXOu4tjBLJtfrTkZB2/Hld4xtF1qlsy9fvZBRKeKlpABTLaa8r/vnR
 Ta0rB2O3/dculZbHZRUnZvLS4Xv4g322vW9Wso9IBoWRn9fC8b2zR93k7breAqcn
 pKbYGg/j6g==
 =/954
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.10'

release v0.22.10
2021-08-06 18:21:59 +02:00
Max Kellermann 64c39af556 release v0.22.10 2021-08-06 18:16:59 +02:00
Max Kellermann 04eb911a51 mixer/alsa: use cached values to work around rounding errors
This replaces 967af60327 with a more
effective workaround.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/822
2021-08-06 18:16:37 +02:00
Max Kellermann 1985786ed2 db/simple: prune CUE entries from database for non-existent songs
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1019
2021-08-05 20:26:21 +02:00
Max Kellermann 8e0d39ae94 db/update/Playlist: prepend "../" only for relative URIs
Prepending "../" to absolute URIs would break them.
2021-08-05 20:19:33 +02:00
Max Kellermann b979245d6c decoder/Bridge: call UpdateStreamTag() only if there is no pending seek
If UpdateStreamTag() gets called while an initial seek is pending, the
result will never be submitted to a MusicChunk.  By avoiding the
UpdateStreamTag() call in that case (by moving UpdateStreamTag() to
after the PrepareInitialSeek() check), the song_tag is preserved until
UpdateStreamTag() is called again from SubmitData().

This fixes missing tags in the "httpd" output.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1137
2021-08-05 18:02:45 +02:00
Constantin Fuerst 955502f881 output/oss: enable DoP
Explanation

This adds support for DOP using the PcmExport function if the macro
ENABLE_DSD is defined. If enabled within the config-file using "dop",
the boolean dop_setting will be true. If DSD input is encountered and
the setting is on, it is checked whether the oss-device supports the
required samplerate. If that is the case, dop_active is set to true
and conversion of the input is prevented. If the sample rate is not
supported, conversion to S32 is requested. When playing back, the
PcmExport is used to pack the incoming stream into PCM.  Reasoning

This is required for OSs without the required driver support for
native DSD playback that also have no ALSA. Mainly *BSD users are the
target audience for this functionality, as ALSA here is only a proxy
without full functionality.  Requirements

    DAC that supports the DOP standard
    Building with OSS, DSD and S32-Format

Supported Formats / Required PCM Formats

DSF, DFF and WavPack-DSD will work.

DSD64, 1 Channel -> S24:176.4kHz (untested, lack of time / missing samples)
DSD64, 2 Channel -> S24:352.8kHz
DSD64, 4 Channel -> S24:705.6kHz (untested, lmissing equipment)
DSD128, 1 Channel -> S24:352.8kHz (untested, lack of time / missing samples)
DSD128, 2 Channel -> S24:705.6kHz
DSD256, 1 Channel -> S24:705.6kHz (untested, lack of time / missing samples)
Changes

    inclusion of required files
    adding new domain for logging
    adding dop_satisfied private function
    adding required member variables for storing dop state and for dop-packing
    adding dop boolean parameter to many functions that are required to act a little differently when dop is active

Testing

This has been tested to work with a Sabaj Da2 on FreeBSD, where the
red status indicator LED clearly shows that DSD playback is taking
place, instead of purple for "hi-res" which is seen when converting.
Issues

I have not tested this with S24 and right now AFMT_S32_NE is
required. If not defined, ENABLE_DSD will be undef'ed. This will be
addressed in a bit, however no DAC which supports DOP but not 32Bit is
known to me. Also, AFMT_S32_NE is not defined when building on FreeBSD
which is why this is just blatantly defined in the file at the moment.
Additionally, the new dop-option is not added into any documentation
whatsoever.
2021-08-05 16:21:43 +02:00
Max Kellermann c97aabe43a Merge branch 'v0.22.x' 2021-08-05 15:17:07 +02:00
Max Kellermann 17b0ac75ca output/oss: always enable PcmExport for alsa_channel_order
We need this even when AFMT_S24_PACKED is not available, for the
correct channel order in multi-channel files.  Internally, MPD uses
FLAC channel order, but OSS uses the same channel order as ALSA.
2021-08-05 15:11:54 +02:00
Cebtenzzre 551c941b5a tag/Builder: don't ignore the result of tag_pool_dup_item
Also, use RemoveAll() instead of directly clearing TagBuilder::items in
most cases, as its elements represent references that must be released.

Closes #1023
2021-08-05 14:25:55 +02:00
Max Kellermann 97c43954e8 input/tidal: remove defunct unmaintained plugin
This plugin has been defunct for several years.  Tidal has not ever
replied to any of my emails, so they're apparently not interested in
MPD support.
2021-08-05 13:52:05 +02:00
Max Kellermann 9fa3984a2f input/icy: adjust offset at end of stream in Read()
ProxyInputStream::Read() assigns the `offset` field, which is the
wrong offset because it does not consider Icy metadata removed from
the stream.  Therefore, after every ProxyInputStream::Read() call,
IcyInputStream::Read() needs to override this offset.  This was
missing at the end of the stream, when Read()==0.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1216
2021-08-02 16:40:04 +02:00
Max Kellermann 5355335f19 db/simple/ExportedSong: check src.OwnsTag(), not this->OwnsTag()
this->OwnsTag() accesses fields that are not yet initialized.
2021-07-30 13:10:09 +02:00
Max Kellermann 64fa76c568 command/file: support "albumart" for virtual tracks in CUE sheets
Instead of checking for "cover.jpg" in the virtual directory
representing the CUE sheet, check its enclosing directory.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1206
2021-07-16 09:04:35 +02:00
Max Kellermann 716784f632 increment version number to 0.22.10 2021-07-16 07:23:00 +02:00
Max Kellermann e4e4576a39 release v0.22.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmDTg80QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFErvaD/93cfFvY/E9NZbI7XmuEfrfX0dUEo2dd8bi
 O1tbEU+8uquNLV5cyb5iEpu6RCbAQxjj8clqVuMgfl0Qe3NQ+Z+nyOg0YVEB4Z16
 cQBDFGawth7HuaqBIdMgnoapUxyGW3KMFw6si5OsV5AMkT5ybdsWg3sOXIXG+cLa
 7KoIwVlgum+DsAPCSKis9fiuZJCnsg9SVcsJnpoaa7ZVOASPp1Wd7F9Kv6wj03/R
 fEQ3z/s/4ILsWmZFHnclFq5LSpNvom5fAiedO15WVsJCxoZHEAg0ZpnNn/whU1HA
 fciGImrjHLCTKVS5xpWNXUMaov2k7LEbLka2AqYwdeuxf7kAeoZC42H/cwK6tH/F
 xuNWg4l9DZQUoGFxN4hfxJi3fsVpx0+3FR+cJQWOuUtwcmh4e7qJKX1gxAjHvEQY
 GPS+jx7ndpcVDJyupvhFVGT0VDEOP7yMTjdY6uc5dXa4Ulx59duvgTdEyYgS4feM
 BqNOYkD2FXnN7nv56f23q5SkRHF5D5nnoc8robIWkng9PXoq1Faq42MwLFxyCdH1
 duRHk06FaFYpPv7gYagarFYIwOKCteL8aOwLymYbJop0O8ripYVQ7hHcEeWNvV+f
 Q1ggllNBD/igvom6tRNl+S7TeQijr44M3/pDvDI3oXJPCfh1ZFGjwKqKqS76JfEu
 v4V1N0rseA==
 =p1U2
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.9'

release v0.22.9
2021-06-23 21:02:06 +02:00
Max Kellermann 18628bf89e release v0.22.9 2021-06-23 20:56:13 +02:00
Max Kellermann 5019bdcd52 TagAny: invoke ScanGenericTags() on remote files
This fixes reading ID3 tags on remote files with the commands
"readcomments" and "readpicture".

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1180
2021-06-23 20:49:30 +02:00
Max Kellermann ab487b9a99 Android: use startForegroundService() in Android 8+
Fixes the error:

 IllegalStateException: Not allowed to start service Intent { cmp=org.musicpd/.Main (has extras) }: app is in background
2021-05-31 20:45:31 +02:00
Max Kellermann ac59ec34f9 decoder/ffmpeg: fix build failure with FFmpeg 3.4
av_demuxer_iterate() was added in libavformat 58.9.100.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1178
2021-05-31 18:10:06 +02:00
Max Kellermann 1f9e32c35e NEWS: fix typo 2021-05-28 15:46:38 +02:00
Max Kellermann 38bfef7d0b Merge branch 'add-openmpt-decoder' of git://github.com/GrimReaperFloof/MPD 2021-05-28 13:53:43 +02:00
Max Kellermann 4ee0a06e18 Merge branch 'v0.22.x' 2021-05-26 13:15:29 +02:00
Max Kellermann 3775766605 NEWS: mention new FFmpeg/ID3v2 tags 2021-05-26 13:07:03 +02:00
Max Kellermann fbaedf2262 decoder/ffmpeg: support the "sort_album" tag
From libavformat/mov.c.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1173
2021-05-26 13:03:47 +02:00
Max Kellermann d2bd12822f Merge branch 'v0.22.x' 2021-05-26 11:57:41 +02:00
Max Kellermann 363d9f0180 db/update/Walk: load all .mpdignore files of all parent directories
When updating everything, this did work, but if updating only a
subdirectory, the ".mpdignore" in the parents were not used.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1172
2021-05-25 22:42:44 +02:00
Max Kellermann fd82d67678 sticker/Database: pass NarrowPath to sqlite3_open()
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1171
2021-05-25 18:45:45 +02:00
Max Kellermann 8a9d678bac Merge branch 'v0.22.x' 2021-05-25 18:21:42 +02:00
Max Kellermann a9c704b76e meson.build: libfmt integration 2021-05-25 15:48:49 +02:00
Max Kellermann 62fc4d5cf4 increment version number to 0.22.9 2021-05-24 09:03:07 +02:00
Max Kellermann 0cca1b138c release v0.22.8
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmCpJFAQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEppSD/92BCDYfQBy0flOy8ZTeTbA9j6pMkn5yRmX
 F6dnfRJ49+HKuMSL4h+6WU/99H+VlClCBK1rSXoilXPzk/IZley4lUEUXQ3JUhtQ
 UDHJ0ZK05VBpOuofih2NLv0IYNi7cvqq1OFsLTi9aRNSseuWxDYQjwaYUCXqM8SM
 u9rgB8U4dLh7ffVM58FecA2cB6E7Qe3D49qulHyCf3kM/eXvo03yTFkAbmi/ejOU
 KI/L/XcG5IYg6BcHaJo5lHZyjCDyKJnBWOUw7+ZtF42izejmj/03I6vGoYBI90K9
 fhjzatRg2ELBhK1MrlJtNhkVISr3oyyXb8SUsP37icioTKMTcJTCP+S4ivTkGoul
 UZoAYkARbQVhjX/07SQ4iMXw0YBVVtv1suxWlCNcCo6trLWwLwM/GAWN9uprukS6
 nIxBrbtatwidqLPvye2ceBmzgZcOac7l/CMK+yIJEddDtkBgVPS1ojW7mayHWCzj
 BIyuWT+6DLnUfRY6ohko6osX8egeBFeSWdKqZmDMUR936nzdJk3I1FUF7hUHVkIj
 JcLEF5+9KY/uNE0qBUrKVzuN+07n8erftKrd26G3N/fdv1hMhs5HGAM2z4G6c4m5
 vsbvnwgjfpH/ux1HLi+5Ne3JVQA9aQ3Ad7Cu7GxhPAdN7EfXkEs0nYFfC4X3hj3U
 bGFnBOwiSg==
 =76ET
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.8'

release v0.22.8
2021-05-22 17:35:30 +02:00
Max Kellermann 14465be847 release v0.22.8 2021-05-22 17:33:36 +02:00
Max Kellermann 0e49de867d input/last: add nullptr check to Open(), fixes assertion failure
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1168
2021-05-22 17:33:25 +02:00
Max Kellermann f2e4529707 increment version number to 0.22.8 2021-05-22 17:32:00 +02:00
Max Kellermann 96707c0426 release v0.22.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmClOSYQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEkODD/49e950HLmZE8x3rmyeEEsgdvHkOVpPlKHo
 +wsmSsi+N0sQKgEOffSYyL0MRWaQqzRMnl1EcEVErCfQl5f1mOw9+TL4f5ZEjVNw
 CQFMy1awHtCfktgF5zq6NzXD3nor9mkjiP733x/kGcsxwfk/Y4radqUBKJ5Y4a2B
 YSg35a/YTOfLCmb9WBquwAi22x7AkyBzyrY3ToCzynVuaNcT3gvLsAAMFzRUKpqD
 QEoCtUxJ4CQayjWjtG/bBCs2TVSmJvovhM2xB4Jnm+MeZz+bKI0y+ALW2Wk0Agnd
 qxDqyCEnvHi5pf8i9usl4/A63VDC7HHj9kDSLtPLGTijv+7Wvvr4kNpwm2DuJ4q1
 1pOEgT480ryK1FPyO6XnYCk616NqjgMbplr6SQ1DuVpIddWdiGARoge/WiNvsbT9
 pnEp0q9V3cQmuJ30LlskMJHAPyrE3KSrO1s+4P2zUeirwnMnOCPdq+gT+lRw4GNG
 OqLFEDHaELgSaZxInCN8RCXdLMrpuvKm+FQQApU1KwbYPXIassR14yt6BPpjxqea
 vkvFLtpwFWthNPLkujak5rDqAPvbHzAeOfaOiZelzd21nl/1omiMXSXRcJkEjONi
 JC5VWJpi1PHMXocq6AcOQT/9XhIH4uDA+Xghn7CURBTB6WoB954TSmuVIjXTfgAv
 XQYqRR+7Yw==
 =Gtzo
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.7'

release v0.22.7
2021-05-19 18:43:19 +02:00
Max Kellermann 3547fc7e61 release v0.22.7 2021-05-19 18:13:26 +02:00
Max Kellermann d747576793 Merge branch 'npu' of git://github.com/neheb/MPD 2021-05-19 09:48:12 +02:00
Max Kellermann b2cec7a0a3 Merge branch 'v0.22.x' 2021-05-19 08:09:05 +02:00
Max Kellermann 85db2d6704 db/proxy: split search into chunks to avoid exceeding the output buffer
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1130
2021-05-19 08:04:50 +02:00
Max Kellermann e108568082 db/proxy: require libmpdclient 2.11 or later
Remove lots of #ifdefs.
2021-05-19 07:46:42 +02:00
Max Kellermann 4fc08e39b4 db/proxy: require MPD 0.20 or later
Allows using ranges, always.  This is required to fix
https://github.com/MusicPlayerDaemon/MPD/issues/1130 without adding
more runtime conditionals.
2021-05-19 07:41:04 +02:00
Max Kellermann dbb18a401b command/file: cache the last "albumart" file
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1156
2021-05-18 17:04:09 +02:00
Max Kellermann a2bdac571a Merge branch 'v0.22.x' 2021-05-17 19:33:15 +02:00
Max Kellermann 638dfc3981 {input,storage}/curl: set CURLOPT_HTTPAUTH=CURLAUTH_BASIC
With the default value CURLAUTH_ANY, libcurl needs to probe for
authentication methods first, and only the second request will have an
Authorization header.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1155
2021-05-17 19:26:05 +02:00
Max Kellermann 0f02bbc2fe output/jack: enable on Windows
This enables the JACK output plugin on Windows, but doesn't link
against libjack64.dll, instead loads the DLL at runtime with
LoadLibrary().  This kludge avoids the extremely fragile JACK shared
memory protocol by using the system's libjack64.dll, without requiring
the same DLL at build time.
2021-04-26 21:47:20 +02:00
Max Kellermann b885f358a5 output/control: add missing nullptr checks
Fixes crash when pausing the default partition after an output was
moved to another partition.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1147
2021-04-26 21:34:58 +02:00
Max Kellermann 650a30d794 Revert "tag/Pool: use strncmp() without strlen() to compare strings"
This reverts commit 1532983fb5.  This
optimization was bad because now all strings match if they are a
prefix of another string, and this caused collisions in the tag string
pool, corrupting the database.
2021-04-15 16:15:44 +02:00
Max Kellermann a7ba10423d Merge branch 'v0.22.x' 2021-03-13 08:41:10 +01:00
John Regan 6dfebf7df9 gme: add support for rsn files
Upcoming release of game-music-emu will support it, details here: https://bitbucket.org/mpyne/game-music-emu/pull-requests/23/rsn-support
2021-03-13 08:40:25 +01:00
bitkeeper c08a8581ee Added cross-origin header to http headers of the http output.
The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream.

The fix is to add the following header to the http response:
Access-Control-Allow-Origin: *
2021-03-10 21:27:19 +01:00
Simon Persson 8f1e7385b7 Add tags relevant to classical music.
This commit adds some tags that are (mostly) interesting for listeners
of classical music.

Ensemble
--------
This is an ensemble that is playing the music, such as Wiener
Philharmoniker. The tag can be used to distinguish the ensemble from the
conductor, composer, soloist, and ensemble, that are generally all in
the "ARTIST" tag.

Movement
-------
The movement number and movement (name) of this track, i.e.  "II" and
"Allegro".

ComposerSort
------------
Allows us to look for Beethoven's 9th under B, for Beethoven, not L for
Ludwig.

Location
--------
This is the location of the recording, e.g. "Wiener Musikverein".
2021-03-10 21:24:25 +01:00
Max Kellermann ee720064a7 Merge branch 'v0.22.x' 2021-03-05 19:41:17 +01:00
Shen-Ta Hsieh e1fe9ebcd6 output/wasapi: Add dop support for WASAPI
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1102
2021-03-05 19:40:32 +01:00
Max Kellermann e1b62fb90d Merge branch 'v0.22.x' 2021-03-05 19:33:46 +01:00
Max Kellermann 17d4873b60 output/wasapi: use default device only if none was configured 2021-03-05 19:25:42 +01:00
Max Kellermann ef1acb4e2f Merge branch 'v0.22.x' 2021-03-04 18:56:29 +01:00
Shen-Ta Hsieh da642b2890 src/output: add algorithm for finding usable AudioFormat
* Use PcmExport for 24bit packed output
2021-03-04 18:53:58 +01:00
Érico Rolim 8d80280ab9 time/ISO8601: don't use glibc extension in strptime.
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that
directly.
2021-03-04 17:49:51 +01:00
Érico Rolim c95e3dc065 storage/plugins/CurlStorage: don't use glibc extension in
ParseTimePoint.

%Z is a glibc extension to strptime, and is a no-op there, due to the
mapping between timezone names and their definition (especially when the
name comes from a different machine) being ambiguous / impossible.  Time
in HTTP headers is guaranteed to be UTC.

Passing an unknown format to strptime() implementations that don't
support it will generally cause them to return NULL, which will lead to
ParseTimePoint throwing an exception and ParseTimeStamp using an
unnecessary fallback.

Since the timezone name goes at the end of the string, we don't need to
use %Z to skip it (could be an issue in a different time stamp format),
so simply removing %Z works best.
2021-03-04 17:48:23 +01:00
Max Kellermann 428f769c38 output/pipewire: new output plugin
Very rough draft.  Barely works.
2021-03-03 18:44:39 +01:00
Max Kellermann 31e3658823 Merge branch 'v0.22.x' 2021-02-22 23:25:07 +01:00
Max Kellermann 6eba621045 decoder/ffmpeg: fix build problem with FFmpeg 3.4
Regression by commit a22d1c88d7

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1097
2021-02-22 13:36:46 +01:00
Max Kellermann c729f16dcd song/DetachedSong: copy the AudioFormat from LightSong
Enables the "Format" row in "playlistinfo" responses.

https://github.com/MusicPlayerDaemon/MPD/issues/1094
2021-02-18 22:16:11 +01:00
Max Kellermann 85427826aa increment version number to 0.22.7 2021-02-17 14:36:06 +01:00
Max Kellermann 9c8da03c5c output/snapcast: new output plugin
New experimental code, first draft - it works, but there's a lot left
to do.  Just look at all the TODO comments.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/975
2021-02-17 14:25:23 +01:00
Max Kellermann f679961564 release v0.22.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmArwO4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEjvyD/9M2icQCKSQheXVD0UWvDZlTaOG6dJtZIfM
 1M9eLC/WG9F6ss2eQy69mfd1IkxO0qx7pPG5NN7zKp7msyK8Hbq6QAoqygKIU9S/
 m5jbrdpuy8A09Mae62b0eapphhtp+Lbpl6RN8QpeROQPd3nX/eSsTngMu//5e4g8
 3qbqkh8Z802FdppcLdBj7f2nUkNoW77bIbVsbm3BQd8EIiVwis9wMgs9Oh9ZEtC9
 krUuij8WjTurSORC/IvqvvOh3QUmb7q7+YwoUrcEBOF1ABcpjf//qVUb4rhOwuVh
 s8BxW+L8sxv3dCSrjG3msbxXLLIVXU8H2pafHyS/rosrnHmTHshiraG1ZMlOh0dE
 kk8piE+7cLERR4JufEnmDtMLQdJfGVTs7QIAsOqtXWNaihsDKA2cZy9AcW3UZTxE
 Vf0PDWl5W8+ibWJ/m9CVWYUEssZ3Jvbi3X0IFAgfYYT8PkIQEqNUWJFelr20Cr6H
 5GNGUooiOGUXBWotrQO8Blhcx3rzwGxzeRLV0JFBqhl7zPnXdQ3Wzo70U714V+rT
 ZRKSisLVbb7vVY2S5OlQf17mGSZufdNc6yzNar9CKwEaUqS64bdzo13NmiIyKqpO
 tuSJlL4otO4/nsdKVj1Pcdr+LKJLFLLR9V5W6DLCiyPChR5adZ9rjN7RS9fChkBn
 9G4ifkbK0w==
 =NeqR
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.6'

release v0.22.6
2021-02-16 13:58:47 +01:00
Max Kellermann 938728820b release v0.22.6 2021-02-16 13:56:14 +01:00
Max Kellermann 80531ef8d8 db/simple: fix ExportedSong move constructor for non-owning sources
If the constructor moves from an ExportedSong instance which refers to
somebody else's "Tag" instance, the newly constructed instance will
instead refer to its own empty "tag_buffer" field.  This broke
SimpleDatabase::GetSong(), i.e. all songs on the queue restored from
the state file or added using the "addid" command.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1089
2021-02-16 13:52:25 +01:00
Max Kellermann a91fba6a3d increment version number to 0.22.6 2021-02-16 13:47:33 +01:00
Max Kellermann ecc07e4e98 release v0.22.5
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmAq1woQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFElB1EACItrIKgEywkzW3l+gmgSjtwwQOiLfg+0Zg
 Z3YgpegDvhmjBVXAHFDlhnXf//zCr286ZmCCVItrz2eGHYX2lvul0SdYxp/+Kebk
 WrCez6LMecaoGjbgiwQ70u/stNkX85ZT62CznNyYvwMx4bRhXXgOuBdKYTAZTvT8
 ABvfL+Ari7TBi88qCAaufmxyv7VFOaZg8+GpV1unIlHE6vu3febzDffPdjfODmOe
 BpLILJJIzUd9p1tGmSCvNCUUHdElktbK1aSVS/0x2xdKG3eDKmPIhSdxdqOdunr7
 9us4Mg7ZB5REaRC0ZfxR6P+vId0uIT3kpyDqs5i8Zao1WwmCdZhvaMMxJ3KF0MVs
 q4Lb99LMF2xAvsoA4x+wY0E0SlFrBhySrFY/i4gaBd9ctzQsbxID3cOZhSbEmQnk
 VNlPK/cYtWVHouLzSOUZeg3/nyMMWXTXy87esB/JdKWqushYLFqy/WIIJvKh4dRL
 YTEJtGeAe7wn9BPoD5Sf1xaj9ULw5CG/Z72inMk1rdzQBn+sWypb8HwJiGtHH43Q
 3YwTSAg/Z3MuxcMM1F9ce/IeE+sqCtOZKgTTpdp56hPlHMV9Fa0v7mnMHz508jB/
 4ZwAm3eEbCy14IKtW1jfKwA/IgPnF6bR6D1nn7F9SKnBG+hdHsyAVyHaTsXbfO4u
 0RZ5Y9vxdQ==
 =I2BI
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.5'

release v0.22.5
2021-02-15 22:50:16 +01:00
Max Kellermann f8be403c34 release v0.22.5 2021-02-15 21:18:18 +01:00
Max Kellermann 6b1d264b35 command/queue: better error message for open-ended range with "move"
The "move" command doesn't allow open-ended ranges because they don't
make a lot of sense; moving an open-ended range is only possible if
the destination index is before the range, and in that case, the
client should be well aware how many songs there are.

Closes https://github.com/MusicPlayerDaemon/MPD/pull/1057
2021-02-15 20:57:22 +01:00
Max Kellermann a6c10e9a1c protocol/ArgParser: check for invalid ranges
Catch errors like that early, before invalid ranges get passed to
internal MPD subsystems.
2021-02-15 20:55:30 +01:00
Max Kellermann ca02fb7782 android/AndroidManifest.xml: enable requestLegacyExternalStorage
This is a workaround for the new scoped storage design in Android 11:

 https://developer.android.com/about/versions/11/privacy/storage

This needs a proper solution eventually, but this quick fix will do
until we change "targetSdkVersion" to 30.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1061
2021-02-15 17:43:05 +01:00
Max Kellermann d4d06da2f8 db/simple: fix dangling LightSong::tag reference in moved ExportedSong
After commit 1afa33c3c7, an old bug was revealed:
SimpleDatabase::GetSong() constructs an ExportedSong instance by
moving the return value of Song::Export(), which causes the
LightSong::tag field to be dangling on the moved-from
ExportedSong::tag_buffer.  This broke tags from CUE sheets.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1070
2021-02-15 17:38:37 +01:00
Max Kellermann f1b8bcd6b2 output/pulse: don't drain if stream is suspended or corked
In this state, we can't make any progress.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1084
2021-02-15 16:07:16 +01:00
Max Kellermann a4b236348f Merge branch 'v0.22.x' 2021-02-07 22:04:07 +01:00