Commit Graph

14492 Commits

Author SHA1 Message Date
Max Kellermann 4a47bbd816 IcyMetadataParser: implement charset conversion 2019-08-10 10:07:13 +02:00
Max Kellermann 7654038d65 util/UriQueryParser: new library 2019-08-09 20:39:34 +02:00
Max Kellermann e4612ecb66 util/UriExtract: add uri_get_fragment() 2019-08-09 20:39:23 +02:00
Max Kellermann 9c6850210d util/UriExtract: uri_get_scheme() returns StringView
Reduce overhead by not duplicating the string.
2019-08-09 20:21:37 +02:00
Max Kellermann 40a2880857 util/UriUtil: split 2019-08-09 20:21:12 +02:00
Max Kellermann ade712d711 util/UriUtil: relicense as BSD-2 2019-08-09 20:16:02 +02:00
Max Kellermann 175e13099c doc/developer.rst: more details about error handling and OOM 2019-08-09 20:16:02 +02:00
Max Kellermann 349a2ea7eb Merge branch 'sid-genre-option' of git://github.com/frno7/MPD 2019-08-09 14:45:41 +02:00
Max Kellermann 192ad91010 release v0.21.13
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1JSe4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEq5gEACNRnk8lADXzerHiuhyySJTpo1hweh+tRpx
 fEahsC1SWa5677SsvHtk+Er8HTrpr0mSCefBbfqAKBSsJzdm1TUepCbEZrKM3jF5
 0PaRiKlOQraqLnT95AOVbdzKK0N2aKvf3aJfDkquG93YfMyJJr0oTGFfQNTT4VFC
 +HuvcqlMragXfLD2xp9WxhjYTajDmCobeBlHKND7FD67VyQqWIwWsRMKZKXXeplS
 kQlFSNLfb4L6x7Qvnz57wMSYHQ1yzjZKoEczjR5WEJBz4GYsw+8BB6M5TR+cyo+y
 LjiEMYMk1b+YiIneuloRaeCS/5PxMBeCSC+w6uqfnm9wGA5dv6zAWwHWJ6XqIYTv
 ORAxoWJ1oN3HAv7ao57g2kGJ5WZwrfVyiS0hViPM0D181w6dMvPgmWdltPZphxtY
 3uNurG45lecXoTtuv4EqWeeVOBzoJI1dUyQ7e73a9+Cpl9u7suAoe/nm3F/nh5ti
 l+I5VeK82GVBePXn02ZRAhkZ+Ll3jvt5Bpz/wyNutP6pWtFjYS6p1W19Hi2UiNOv
 56+ackJFr4oCqOoCKWHbwJbyrx44nhnBxiyEOhGdVA9xdB2EpYKOoZ29iGKEO2um
 +QytEt8gf6YVe3C51OlmJfnZoJ4+pwIWpQFyjT40CMy6ZL0swdLlMgFv5+LSjzrC
 eKJz2/h4dg==
 =ICvW
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.13'

release v0.21.13
2019-08-06 11:39:25 +02:00
Max Kellermann d4d2bc072e release v0.21.13 2019-08-06 11:35:42 +02:00
Max Kellermann bcccc8f66c output/jack: use jack_free() for Windows compatibility 2019-08-06 11:34:56 +02:00
Max Kellermann 848c63e2d5 output/jack: use std::atomic_bool for "shutdown" and "pause"
Without this, the compiler may optimize accesses away.
2019-08-06 11:34:00 +02:00
Max Kellermann f6d0310f9c output/jack: use SIZE_MAX instead of (size_t)-1 2019-08-06 11:33:52 +02:00
Max Kellermann 3ef043392c input/cdio_paranoia: drop support for libcdio-paranoia older than 10.2+0.93+1
Version 10.2+0.93+1 was released five years ago in 2014 and is the
first version to feature cdio_cddap_free_messages().  There is no way
to check the libcdio-paranoia version at compile time, so let's just
remove support for older versions instead of attempting to fix the
cdio_cddap_free_messages() check at build time.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/613
2019-08-06 11:09:36 +02:00
Max Kellermann 864d6f312d Revert "decoder/mad: use MAD_F_MIN and MAD_F_MAX"
This reverts commit f7ed7446ae.  It was
a bad idea, because MAD_F_MIN and MAD_F_MAX do not represent the
clamping limits, but the theoretical minimum and maximum values of the
mad_fixed_t data type.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/617
2019-08-05 13:07:41 +02:00
Max Kellermann f44c67de09 increment version number to 0.21.13 2019-08-05 13:05:54 +02:00
Max Kellermann 91fb91d89c util/StringView: prepare the transition to std::string_view
Unfortunately, we need to disable this for GCC versions older than 7,
because it doesn't have <string_view> yet.
2019-08-05 10:23:05 +02:00
Max Kellermann 8b399b7133 output/jack: use jack_free() for Windows compatibility 2019-08-05 09:35:41 +02:00
Max Kellermann 9d24f68f51 output/jack: convert to class, make attributes/methods private 2019-08-05 09:31:40 +02:00
Max Kellermann 44652fdb13 output/jack: convert callback functions to static methods 2019-08-05 09:29:27 +02:00
Max Kellermann 2892a6f5e2 output/jack: merge set_audioformat() into Open() 2019-08-05 09:28:41 +02:00
Max Kellermann 2fc40e5575 output/jack: eliminate "shutdown" flag, use only "error" (mutex protected) 2019-08-05 09:24:43 +02:00
Fredrik Noring 7363fe90bb decoder/sidplay: Add "default_genre" option
Genres are not part of the SID format, so SID files are genreless. This
"default_genre" option may be used to assign a default genre to all SID
music, for example "SID", "C64", "Chiptune", etc.
2019-08-05 06:23:40 +02:00
Max Kellermann d146bef740 output/jack: use jack_on_info_shutdown() 2019-08-04 20:25:13 +02:00
Max Kellermann 1f4c4be1f1 output/jack: use std::atomic_bool for "shutdown" and "pause"
Without this, the compiler may optimize accesses away.
2019-08-04 20:24:51 +02:00
Max Kellermann 90067d16c0 output/jack: use SIZE_MAX instead of (size_t)-1 2019-08-04 06:34:43 +02:00
Max Kellermann cde6c46d2f util/Macros: replace with std::size() (C++17) 2019-08-03 13:10:49 +02:00
ckdo d305f187d5 Add the ability to specify media.role for pulse output plugin
This is useful in multiple mpd instances scenario, or multiple pulse outputs defined on the same mpd instance.
It is actually a more flexible way to route flows than the "sink" parameter, letting the PulseAudio routing do its job, but with the ability to isolate routing for each output.

If not specified, the role remains like it was before this commit, ie "music"
2019-08-03 13:03:05 +02:00
Richard Dodd 4f6a713b32 Add option to not connect jack ports automatically 2019-08-03 13:01:47 +02:00
Max Kellermann 8f981845dc switch to C++17
Time to move on, two years after 2017.
2019-08-03 12:57:56 +02:00
Max Kellermann c764b70b3a decoder/mad: merge DecodeNextFrame() and DecodeNextFrameHeader() 2019-08-03 12:55:56 +02:00
Max Kellermann 52bb03e136 decoder/mad: eliminate redundant error handling from DecodeNextFrame()
Much of that is not possible when mad_header_decode() has already been
called.
2019-08-03 12:55:48 +02:00
Max Kellermann a90685d6cf release v0.21.12
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1FZnQQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEjrXD/0QChgJtx6sVPRpMK7KszwgpmxNkhDPA13l
 puuYTg0eEZe9EJxNM82ouCNn2kOx9OjP5DKyeus0Dt4Pk5Cwj8HGeHqjTahtwHtD
 jbVy5kiEZ57NjBoLFoQBI6vMuzcz/DKStq2HmPJ62NQCIqbiTQXPpWvDYAieTFV+
 lbM7vc7VQ6A3bhms//vYMZYmQV7T4Eam3iEVxoQhX4Pd+wWXv+XcTfdI2UTUFWIY
 mt7+AZlG2ynev+zszUtDLB4aFEbRcLUBlSKuPv3j5ox7BjleLJXltpVbisI+TDHL
 nAyb2LtOTeVPpAaqiPeCju2ucWaUOsFkHmSCjPu8BHc8b4mLATiozv2BzY1qe5rX
 G7DZxCLq3IBtY4u4FpR4kOuVcjTGFKCToHGl8N6GrPmfa3n+MqPLAqKx32tSq+r/
 po2kbB9t0IXXT1njGWLb9W6y7z/7dsvy3YgjV6L7SfY/SA9MZELx+MBED2GSDYr9
 eWLK7LDO5soBUZvnDVJZO/a1oP0n5WiSV9n2/YGgRJXcljW8tJ8C76yMNziPK7yn
 Fjmc12o6kf5Afo3dNsLAdXH4p/8LeYK9IcJZmGfwBCccMHlnX+ySLfBOyuyUDD7g
 nOV/o7av/HZzirQ9h2CGUZhBPbPARjvMI+mhDVGxUx3OYxW9UfokmMVEs4h21f0R
 4XRbOUejVA==
 =hzQJ
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.12'

release v0.21.12
2019-08-03 12:53:23 +02:00
Max Kellermann ae19bda1f2 release v0.21.12 2019-08-03 12:48:20 +02:00
Max Kellermann f2d8fd769d player/Thread: don't restart unseekable song after failed seek attempt
The check IsSeekableCurrentSong() was added by commit
44b200240f in version 0.20.19, but it
caused a regression: by doing the branch only if the current song is
seekable, the player would restart the current song if it was not
seekable, and later the initial seek would fail; but we already know
it's not seekable, and so we should fail early.
2019-08-03 12:30:10 +02:00
Max Kellermann 9661062ae2 decoder/mad: pass const reference to RecoverFrameError() 2019-08-03 11:59:41 +02:00
Max Kellermann 2a07354cad decoder/mad: change integers to size_t 2019-08-03 11:44:02 +02:00
Max Kellermann fc18fd571c decoder/mad: return from SynthAndSubmit() early 2019-08-03 11:42:05 +02:00
Max Kellermann 51abed9732 decoder/mad: pass mad_pcm to mad_fixed_to_24_buffer() 2019-08-03 11:40:06 +02:00
Max Kellermann d00afc912c decoder/mad: eliminate the loop in SubmitPCM()
libmad has a hard-coded maximum PCM buffer size; if we make our
output_buffer just as large, we can avoid the loop, because any
possible size will fit.
2019-08-03 11:36:05 +02:00
Max Kellermann 9d0fe725eb decoder/mad: rename a few misnamed methods 2019-08-03 11:32:42 +02:00
Max Kellermann 8a432c9b7f decoder/mad: move code to LoadNextFrame() 2019-08-03 11:32:06 +02:00
Max Kellermann 187204f03c decoder/mad: move code to HandleCurrentFrame() 2019-08-03 11:32:06 +02:00
Max Kellermann 5e5fadb5f2 decoder/mad: remove unnecessary initializers
These will not be used until they are initialized in SyncAndSend().
2019-08-03 08:49:26 +02:00
Max Kellermann 952c793235 decoder/mad: subtract libmad decoder delay from LAME encoder padding
Apparently, libmad not only inserts 529 samples of silence at the
beginning of the file, but also removes them at the end.

This solves the last piece of
https://github.com/MusicPlayerDaemon/MPD/issues/601

Closes https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-03 08:35:00 +02:00
Max Kellermann 3e3d8c7f9d decoder/mad: pad the input buffer with zero bytes and end of file
libmad requires padding the input buffer with "MAD_BUFFER_GUARD" zero
bytes at the end of the file, or else it is unable to decode the last
frame.

This fixes yet another bug which prevented this plugin from decoding
the last frame, see
https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-03 08:32:27 +02:00
Max Kellermann 9b99a9897a decoder/mad: don't count the Xing/LAME metadata frame
The Xing/LAME frame indicates how many frames there are, but that
excludes the initial Xing/LAME frame.  Therefore, it should not be
counted.

This fixes an off-by-one bug which caused the last frame to be
skipped, fixing one part of
https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-03 08:25:48 +02:00
Max Kellermann 4f56fdc397 decoder/mad: make "current_frame" zero-based
Increment "current_frame" after processing the frame.
2019-08-03 08:24:25 +02:00
Max Kellermann c87d6825ec decoder/mad: add API documentation 2019-08-03 08:07:30 +02:00
Max Kellermann 00830a20e3 decoder/mad: convert to class, make almost everything private 2019-08-03 07:52:51 +02:00