Commit Graph

1355 Commits

Author SHA1 Message Date
Max Kellermann 014f8cd693 output/httpd: flush encoder after tag
Without the flush, ReadPage() may not return any data, or not all
data.  This may result in incomplete ddata the new "header" page,
corrupting streams with some encoders such as Vorbis.

Fixes #145
2017-11-14 12:00:14 +01:00
Max Kellermann aea37e46e3 encoder/vorbis: default to quality 3
Don't require a quality or bitrate setting.  If nothing is set, don't
fail startup - just go with a good default.  A quality setting of 3 is
what "oggenc" defaults to as well.
2017-11-14 11:30:28 +01:00
Max Kellermann 31ab78ae8e input/{cdio,ffmpeg,file,smbclient}: unlock the mutex during blocking I/O
InputStream::Read() and InputStream::Seek() are called with the mutex
locked.  That means the implementation must not block, or unlock the
mutex before calling into blocking code.

Previously, a slow CD drive could stall the whole MPD process,
including the main thread, due to this problem.

Closes #149
2017-11-13 17:13:10 +01:00
Max Kellermann e4a147218b Merge branch 'v0.20.x' 2017-11-12 18:55:12 +01:00
Max Kellermann a2b77c8813 decoder/ffmpeg, test/test_protocol: catch exceptions by reference
Work around -Werror=catch-value.
2017-11-12 18:54:29 +01:00
Max Kellermann fef9747fbf output/shout: use MIME type instead of the encoder plugin name
This is more robust, for example it allows using the Shine encoder
plugin instead of LAME.
2017-11-10 21:52:54 +01:00
Max Kellermann 523051132d Merge branch 'v0.20.x' 2017-11-05 17:48:41 +01:00
cathugger b111a8fe8d output/Thread: ensure pending tags are flushed in all cases
Fixes hanging playback with soxr resampler.

Closes #139, #141
2017-11-05 17:42:32 +01:00
Marcin Jurkowski 3b23cf0258 decoder/vorbis: scale and clip tremor-decoded samples to 15 bits
Tremor decoder is unusable since commit 2ee43c4. Sound is distorted to
the point where it's nothing but noise.

The data from vorbis_synthesis_pcmout() needs to be scaled and
clipped for 16 bit sample size. For reference see
http://lists.xiph.org/pipermail/tremor/2010-April/001642.html and
http://lists.xiph.org/pipermail/vorbis/2006-October/026513.html.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-11-03 19:45:41 +01:00
Max Kellermann 28e864e096 player/Thread: log message when decoder is too slow 2017-10-25 20:26:09 +02:00
Max Kellermann 1de19b921a input/curl: call StartRequest() after setting CURLOPT_RANGE
It's not possible to set CURL options after curl_easy_perform(), and
thus the CURLOPT_RANGE had no effect.
2017-10-24 21:43:39 +02:00
Max Kellermann ab05b70423 ClientProcess: close connection when client sends HTTP request 2017-10-24 20:32:53 +02:00
Max Kellermann 338e1f5926 increment version number to 0.20.12 2017-10-24 17:31:55 +02:00
Max Kellermann b4b468eb27 release v0.20.11
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlnnDXYQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEtPBD/4sOwd7sQr/eeJr5gqVpil+CaVkHN1GpVmF
 H72uYnp5eKREywLMAqrY86hxvykeflroHyNyBF7CV5hIZV8kPl1ApN6WvjG3oFeX
 ZnM6PQjeqgqczSVUZOd92nATJw6g/Vk0qbC+h6VwhpSoq5716dAKriSO25JzDg0L
 KOwEztVsLeziKrk/sHSKjgRrYpuNS8bFVxAY8Pk9MnUhEeHB3Rb7Spd2zMUfMDLF
 1pncFliIX5bOUKzDavIo4flAWc3jj514VhS7rVaU2OYpAdsQV18Z5Ze5B+46FUan
 2gsn3oCOVbC3QV7X0do5MtD9p1tyX0HREokY3ttgut+iRz9zym2m0uC6t1DXwyVI
 cugOF70JbBYxd/ChO4rFYPHZo6A1XE7hb89AcVf6EgZyXROK077EzptprW9et0Ge
 kIUbHs01lHfA7gFefEC+8iVGSXQmEmQQp5tBnZkdUaJdpxVULdMkhhHCNU8RIIVP
 ot8guH2/9oKkCj+ytHj37SUpk7bKjbzID9XIW5a+4rQPb1oRmQMvIeKgWZ6sjHP1
 5cS7l51q0onPmulfdQti0jTuaRcwQZcyKOxBU+eKYNHGNgLsdk1QDxyDhqbCCqWv
 0seA7h+lNBGqZL7/F6s0IxsTWIwaInkZWPE1EGSRe0wvZohDtBbNhXWQDPBlgl8O
 R42Jdx6PIg==
 =8U+o
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.11'

release v0.20.11
2017-10-18 10:21:39 +02:00
Max Kellermann a7fdfa08e1 release v0.20.11 2017-10-18 10:14:46 +02:00
Max Kellermann 9703a401c5 Playlist{File,Save}: always use UTF-8 in playlists on Windows
Turns out that using CP_ACP is a lousy idea, because only very few
Unicode characters can be represented by it.  Instead, switch to UTF-8
(which every sane person on other operating system already uses).

Closes #102
2017-10-18 10:05:26 +02:00
Max Kellermann 91254e9211 queue/PlaylistControl: keep order list consistency in MoveOrderToCurrent()
Our previous use of Queue::SwapOrders() could cause surprising
results:

- sometimes, the old "current" song would be played again (if the
  newly selected song had not been played already)

- sometimes, the old "current" song would not be played again (if the
  newly selected song had already been played)

This is inconsistent, because it should not depend on whether the
newly selected song had already been played.

So instead of Queue::SwapOrders() we now use Queue::MoveOrderAfter()
and Queue::MoveOrderBefore(), which is more expensive, but also more
consistent.  It attempts to retain as much from the previous order
list as possible, and only moves the newly selected song around.
2017-10-18 09:05:47 +02:00
Max Kellermann fa67c2548a decoder/Thread: clear the command after catching an exception
If an early exception gets caught (e.g. from
AllocatedPath::FromUTF8Throw()) before
DecoderControl::CommandFinishedLocked() is called, the decoder thread
would go in an endless loop, because DecoderCommand::START is still
set.

Closes #118
2017-09-27 17:08:16 +02:00
John Regan ea80587ddb GME Plugin: fix track numbering
GME starts all track indexes at zero, but subtune prefixes
start at one. This fixes an off-by-one error during track
enumeration.
2017-09-27 11:18:03 +02:00
Max Kellermann af033c0d1d NEWS: mention the GME decoder change 2017-09-22 20:00:12 +02:00
Max Kellermann f6691579de Merge branch 'v0.20.x' 2017-09-20 23:57:28 +02:00
Max Kellermann 1295a1272a lib/icu/Compare: add fallback using strcasecmp() and strcasestr()
Our IcuCaseFold() fallback using strxfrm() is not actually case
insensitive.  This commit fixes the problem by switching to
strcasecmp().  That function is not guaranteed to support UTF-8, but
it's the best we can do in this sparse situation.

Closes #111
2017-09-20 23:43:27 +02:00
Max Kellermann 5ce93d6fa8 output/sndio: refuse to build with libroarsndio
RoarAudio's sndio emulation has been a source for annoyances.  First,
their headers turned out to be broken with C++, due to their use of
the "new" keyword.  Then they used a preprocessor macro to rename
"sio_hdl" to something else, effectively disallowing the use of
forward declarations.  Enough is enough, and I'm removing support for
it.

RoarAudio users should better use the RoarAudio output plugin.
2017-09-19 19:38:43 +02:00
Max Kellermann 20a5ef2798 NEWS: mention the sndio mixer plugin 2017-09-19 19:38:43 +02:00
Max Kellermann 44bbf42a9f Merge branch 'v0.20.x' 2017-09-19 18:58:02 +02:00
Charlie Waters b253a6b71e ffmpeg plugin: when decoded stream duration is unavailable, attempt fallback to container duration (fix MusicPlayerDaemon/MPD#110) 2017-09-18 10:39:27 +02:00
Max Kellermann 3f754fd350 Merge branch 'v0.20.x' 2017-09-04 08:27:08 +02:00
Max Kellermann f4f461b8bb storage/curl: support Content-Type application/xml 2017-09-01 11:32:40 +02:00
Max Kellermann f6abbc01bd increment version number to 0.20.11 2017-08-31 19:48:59 +02:00
Max Kellermann 0b93f52ba4 release v0.20.10
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlmefSAQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEut8D/4oZgzdHTMbR6uYbFvkUmPrwtohq8N4JbaS
 /TtESfKPJ5PIv42MA5k89DjssQUz0uzuladsy+WXxTx8BD4naXaiOy7loDXjPcnu
 YL0sUdAKZVVBdau4dcumSQF0ewhUjuKZUt2I6W2Q35IpagV89nf+mHUXDtUrjykC
 coXIwrcINpi0MSo1pbS5m11XNOk2yPfl8ZR+9yn6AvaseCtrwxmogAJGK5bUSKUM
 NMaLffVLNfIL/YEBzm2RdgSyU4LBREKnO6vF7UCBSKHIVPyne83fbqc90COj7I9Q
 01LGowUAvJIoRIlMzjxlXO6S13hmXJlDZSECaaQYQjiC70RbC1+sK9tQtKQ4BqET
 C+vG9ysfqVi4bsYkOppR5JDE9NcghkjK+iGwBYVdXmRwGzmdb1W6fWgAqYGRF+Ql
 Fg+/htruNsvvuO+RtcOd8WJWpP3nKisGu9jRp7dceAsWGE20M8HTjCeSZsZM+LvU
 B9Lp9NplKqkJyq2k81OUmGBWkR7t8okMeZGvon+sExZ285giryOfhao4eEX7CBqy
 XHlClydNnBW11R6TEzhjIxCDufPdboM0XHVxX4kutfkPVGkPnJR/8Jk0c+d7AiVE
 H5MSgWsOu9fN//nIuUxdODtL5VMw45/hdydZ9YMI/RnwMQFdEqAZmBvMKE7ZLqrI
 F80eZ8/nQg==
 =b8hp
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.10'

release v0.20.10
2017-08-24 09:35:34 +02:00
Max Kellermann 57a71c157d release v0.20.10 2017-08-24 09:15:43 +02:00
Max Kellermann a00d412008 player/Thread: initialize play_audio_format, fixes assertion
This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
2017-08-23 17:43:49 +02:00
Matthew Leon aa9c6062b0 Merge branch 'v0.20.x' into master
contains OSX mixer
2017-08-22 10:36:37 +01:00
Matthew Leon 5fb39658f1 OSX mixer 2017-08-21 20:05:50 +01:00
Max Kellermann fe9ffcb9d2 Merge branch 'v0.20.x' 2017-08-08 19:30:30 +02:00
Max Kellermann b0703b92c3 util/FormatString: pass the allocated buffer to AllocatedString::Donate()
.. and not the stack buffer.  This made the AllocatedString destructor
crash.

Closes #52
2017-08-03 00:25:30 +02:00
Max Kellermann d29bdf3e81 Merge branch 'v0.20.x' 2017-07-31 13:50:14 +02:00
Max Kellermann dd9fd3d8a7 tag/Aiff: the FORM chunk size is big-endian
Was broken by commit 8a86460b8f

Closes #87
2017-07-31 13:46:09 +02:00
Matthew Leon 4c0404c70d Check for MusicBrainz id3v2 tags in ffmpeg.
Addresses #82.

Previously, the ffmpeg decoder only checked for the "generic"
MusicBrainz metadata keys used in other metadata container formats.
2017-07-20 08:28:14 +02:00
Max Kellermann 5ed5d7fe60 Merge branch 'v0.20.x' 2017-06-15 22:51:07 +02:00
Max Kellermann 58a99f1907 increment version number to 0.20.10 2017-06-15 21:35:23 +02:00
Max Kellermann 979f1b6c39 release v0.20.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
 aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
 BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
 OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
 QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
 1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
 aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
 UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
 9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
 01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
 /6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
 jnXnPFxqBw==
 =0SSp
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.9'

release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann cf86dfd317 release v0.20.9 2017-06-04 12:51:36 +02:00
Max Kellermann 62b03cfddf storage, db, mixer, command: remove more bogus "pure" attributes
This commit is similar to 788e3b31e1,
and removes more "pure" attributes which were placed on functions that
could throw exceptions, which is illegal according to clang's
understanding of the attribute (but not according to GCC's).  GitHub
issue #58 was most likely about StorageDirectoryReader::GetInfo() and
Storage::GetInfo(), which still had "pure" attributes.

Closes #58
2017-06-03 21:54:24 +02:00
Jörg Raftopoulos 18b827b979 decoder/ffmpeg: add support for adx
Add ffmpeg decoder support for *.adx files (Sega game console)

Closes #60
2017-06-03 20:57:20 +02:00
Max Kellermann 0a379fc514 system/ByteOrder: fix byte order detection on FreeBSD/aarch64
Patch from
 https://svnweb.freebsd.org/ports/head/audio/musicpd/files/patch-src_system_ByteOrder.hxx?revision=441921&view=co
(with a tiny modification)

Closes #59
2017-05-29 20:37:14 +02:00
Max Kellermann 445c11b8d9 increment version number to 0.20.9 2017-05-29 20:36:08 +02:00
Max Kellermann 86d05e98e5 release v0.20.8
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkfNQ4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEm0/D/92uGQTZ8x3qMpMN7R0jw4GBYjkqCDtz2wH
 UujnfqUZfr852wkFBP3LiraicGr5dzsRwM272hlXeMDp3s3EPT8eNIgwiETDreD/
 NpA/Pqyl4ZfvyPGkrtvW2ZMWENVrGjAoygHQr3evemIdH5ypxWCzSaNbiOyeabqp
 +HqyOFeJckUHC70A2vOU8jredhGFYWOdKRZT9WRdBLTwaKd80DRmsKxi8d5Yc/ms
 nVeGCVpF9OpyjlJu0+7v3DT0ekgTJI2CihZT3GdasCRllPa397uHiqKeah2DkOId
 z1AMcxhzR+tz4cafW5iz8xtyIDdXPL+SD58wkuUDJO2ePCNRLTt1zW9ijJFWzocu
 o6MTyn7mpN2Zp/dLLUrxNkNKTT/YvaaGBIn4fuLPbGQXNjITyVRkw233fOz/6c39
 EOcR86ws60e4F2JLbxN3lEKL5bLkLPNK2J+xWEpRHGXy5Bfn6C8uQklno3h3urHG
 DI2p+3og/+7I+MNOX88CMZBdNpfqiWKNSrSAAsi99CwIXIYz0qlKPx9qQyTK0wyh
 xPrU/j5GGQqR2eoR6eChiB3LOE8SLxfeLgrMJ2HB+w550F4KxaCVxpxpWI3D0GX8
 +tC4uDE+LkGdOc1pbOYUHQWNhFwy3jRxo+wkcb5wz5QXBVVEGlYqo5BcSeX1Clx+
 kiO3g9SNlg==
 =mUPF
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.8'

release v0.20.8
2017-05-19 20:13:01 +02:00
Max Kellermann 8d290ad509 release v0.20.8 2017-05-19 20:10:22 +02:00
Mario Di Raimondo ffa676f577 playlist/m3u: support for mime-type `audio-mpegurl` for M3U playlists 2017-05-19 15:25:58 +02:00
Max Kellermann 0a3a5a7c65 Merge branch 'v0.20.x' 2017-05-16 10:09:20 +02:00
Max Kellermann 64786ec12a Main: omit "constexpr" on MIN_BUFFER_SIZE with GCC 4.x 2017-05-16 07:20:47 +02:00
Max Kellermann b3c82f8886 output/{osx,haiku,pulse,sles}: add missing "noexcept"
Fixes build failure on OS X, closes #44.  With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +02:00
Max Kellermann 063259dc52 increment version number to 0.20.8 2017-05-16 07:06:57 +02:00
Max Kellermann 4faef28cc5 release v0.20.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
 QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
 5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
 nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
 Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
 VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
 5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
 9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
 mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
 ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
 2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
 lPEdovokNw==
 =CdDy
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.7'

release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann b4c9d9c2a7 release v0.20.7 2017-05-15 22:51:08 +02:00
Max Kellermann fa2b59df4b Main: cap buffer_before_play at 80% to prevent deadlock
Closes #34
2017-05-15 22:49:31 +02:00
Max Kellermann f41a169460 Main: enforce a reasonable minimum audio_buffer_size setting 2017-05-15 22:44:18 +02:00
Max Kellermann 788e3b31e1 *: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was.  clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.

When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41).

This commit removes all such misplaced "pure" and "const" attributes,
closing #41.
2017-05-08 17:25:06 +02:00
Max Kellermann b0ce551523 decoder/pcm: support audio/L24
Closes #31
2017-04-24 20:54:13 +02:00
Max Kellermann f6e428ac22 Merge branch 'v0.20.x' 2017-04-24 11:44:27 +02:00
Max Kellermann 95b62a843a Merge branch 'add-original-year-tag' of git://github.com/tremby/MPD 2017-04-21 18:55:34 +02:00
Max Kellermann 504f5f7bdd storage/FileInfo, db/simple/Directory: use 64 bit for device/inode
An ino_t is usually a 64 bit integer, and some file systems (such as
Linux's kernel NFS client) really uses the upper 32 bit.  This can
lead to false positives in the directory loop detection in
FindAncestorLoop().  Increasing these two attributes (in
StorageFileInfo and Directory) to 64 bit adds little overhead, but
makes the check a lot safer.
2017-04-06 09:58:25 +02:00
Max Kellermann 32bcad51b8 configure.ac: prepare for 0.20.7 2017-03-16 10:50:12 +01:00
Max Kellermann e26d49efb7 release v0.20.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAljCzQcQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnIXD/9ltsmg3VC81NHOmcUehFgUaLyNh8o2iEr9
 tQfdydQxfTXBIGztMoPsPz71da8BIqAgMTCTGAEpTUXIW6ViGkgsoDlR2fAOagG2
 ybHn2q3WsPERJvkGZ4xIo0ti0pLLy7wrFpmShgOKuwb6YqOgSV+rbu/CaQanxVJE
 S599vo6rV/OI4KFSYWJbfafifN/Mqmzfl/D/tB5xaMvhas60XZ6pZTp/xH8OlnML
 8qkgPmN3gJe7DPq6L3rdwKobJuS1X6NLHSp1DyGVRy68B0sd3tMmbOocMeyi1OlE
 1z/n/M+dcSUhdHAh/Pg0wrvH0UpUlJ11blSDiWB9gqr9oOvCZO+OcPCnk0QJrqq+
 qselDNWBLvVPESbxlPO4OUbV6jxPPhVgz18RYl6JaJeUFjXkuiytI/t6jsbVM3+f
 ZC1UgO+TznCuDjjMj35RP9QDkUQpuH6CK4+tyxbH7Fe4KQi02FQdtK8Q/CnESBLl
 alTLYQk7VlwL1oMgezoZfTLDbsihRrEO6Y0cp/pObUrEjQ65706UGUf61PRQGBM9
 DlEPqfuH8TMgksxDIrkt68pWjyCXhhUCA+RsyFJoMp7Xq6Gy2pZUn2yKCmTXLte/
 v5xW9FuiSvKUKlvYbfk/q3u/GTCJELf0eY3y0Eryqp6nOEZHmzz8HOF7Bs2PxM3B
 eU/fEKWxVQ==
 =21bM
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.6'

release v0.20.6
2017-03-10 17:02:32 +01:00
Max Kellermann a40510c241 release v0.20.6 2017-03-10 16:57:59 +01:00
Max Kellermann ac8dce6599 lib/curl/Request: "ICY 200 OK" is a response boundary header 2017-03-10 16:28:02 +01:00
Max Kellermann 1b6666fa39 Partition: handle SYNC_WITH_PLAYER before TAG_MODIFIED
The TAG_MODIFIED handler (i.e. playlist::TagModified()) works only if
the modified song is the current song - something that is not updated
until SYNC_WITH_PLAYER is finished.  This fixes tag updates right
after a new song is started.
2017-03-10 16:11:34 +01:00
Max Kellermann 1dd01c99e8 decoder/sidplay: make compatible with libsidplayfp < 1.8
https://bugs.musicpd.org/view.php?id=4665
2017-03-10 13:48:52 +01:00
Max Kellermann 3be2051808 decoder/Thread: check ENABLE_FFMPEG, not HAVE_FFMPEG
This repairs the damage to commit 74dbaade6f done by commit
b3f5b4932c
2017-03-01 17:06:23 +01:00
Max Kellermann e22a4fdba4 command/Error: improve libstdc++ 4.9.x detection for std::rethrow_if_nested() workaround 2017-03-01 16:38:22 +01:00
Max Kellermann 29a7b2c5b5 decoder/mpcdec: ignore empty frames
https://bugs.musicpd.org/view.php?id=4656 describes a crash due to
division by zero because frame.samples==0.  This should never happen,
but apparently can happen after seeking.  The best we can do is to
just ignore this frame.
2017-03-01 16:13:21 +01:00
Max Kellermann 3b6c285c2a configure.ac: prepare for 0.20.6 2017-03-01 16:13:21 +01:00
Max Kellermann 29d03ab937 release v0.20.5
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlirVtMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEgbaD/9tgcgcnbiWGkNDMf0qfqfaiY80wA4HbSBT
 qbKzan/kuiPXL6xcgw8YRYdAjyaIyw//f1q0SL8/LKvVQ4CrlTEQzOQUzrAOe02n
 m35/6YKZVzziMRwuSZY4oQ4WH7SE87gthYIykRt59adznr2QNtQe53SnXd8ukGtf
 l8xlLNuIiEwIo5PZ8ObEZH1dUP1PWtfJlxQfbJ2JhZTOR/qPfrpIzSK4GVY0ZXdz
 EO6BIZyDgPfeZCPBZqiKmw4vcdIHBhG9ZgtOhX3YATV7ZSYqmjrUcjzEsoyQlOaH
 rhe/whl272TQYdj95//BnqI899NVSNRYg6XXGlCB5TXqFscoDCW6JXvVAaTfB0Yg
 vMV7ZYX8auu2i013O51yoj8/ofNmOjqbX9eui+gJx6Xb6Zr9Ttma5woYRh14NXwd
 15KObGCd1LADpiOZ2XQ8Snlu8QlZ+PXr8RpLh9uSwDe7heemMRKqDZEf3AxfP3wO
 GUOK4EHfZ5kZQHlWLA3u59Zopo1ZJjL6EJUTG3Qk+n/Wob/S2F/v5IFIdyaEFTKI
 hrcTEQ/EmXZ9vc5Iw/LnIM49pO3kZXKQ9bSrZoi0kjk2AN6XBMmJNoYv/+huc2U9
 JiCcyM8olCWcSQnPGjoHWxBGLhxNXtR+WYu/tEEq3+D2PFdkfOap3ApP1qdi+JPd
 JFps/sOkgQ==
 =4+OJ
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.5'

release v0.20.5
2017-02-20 21:59:40 +01:00
Max Kellermann 575d1786af release v0.20.5 2017-02-20 21:51:31 +01:00
Max Kellermann 7e46277016 Merge branch 'v0.20.x' 2017-02-19 19:46:18 +01:00
Max Kellermann 4bb83781e8 output/httpd/IcyMetaDataServer: cast length to unsigned
Fixes another buffer overflow: if the stream has a very long title or
URL, resulting in a metadata string of more than 2 kB, icy_string[0]
is a negative value, which gets casted to size_t - ouch!

 https://bugs.musicpd.org/view.php?id=4652
2017-02-19 19:28:52 +01:00
Max Kellermann b1c7649edb output/alsa: non-blocking mode
Use SND_PCM_NONBLOCK, and perform all snd_pcm_writei() calls in the
IOThread.  Use a lockless queue to copy data from the OutputThread to
the IOThread.

This rather major change aims to improve MPD's internal latency.  All
waits are now under MPD's control, instead of blocking inside
libasound2.

As a side effect, an output's filter is now decoupled from the actual
device I/O, which solves a major latency problem with the conversion
filter on slow CPUs and small period buffers.  See:

 https://bugs.musicpd.org/view.php?id=3900
2017-02-09 21:36:18 +01:00
Max Kellermann 67a958a326 Merge branch 'v0.20.x' 2017-02-09 21:24:20 +01:00
Max Kellermann 29e1b6e465 mixer/alsa: reset the MultiSocketMonitor in the destructor
Fixes potential crash bug.
2017-02-09 21:13:19 +01:00
Max Kellermann 3c55487a16 configure.ac: don't require libsidutils when building with libsidplayfp
The libsidplayfp fork has merged libsidutils into the main library.
The libsidutils we used to link with was part of the original
libsidplay project.
2017-02-09 13:09:03 +01:00
Max Kellermann 3850716522 command/Database: add "sort" parameter to "find" and "search"
Implement the second part of https://bugs.musicpd.org/view.php?id=3990
2017-02-08 11:22:08 +01:00
Max Kellermann 29453ba196 client: add tag_mask attribute
The "tagtypes" command now has several sub commands which can be used
to edit that mask.
2017-02-08 09:06:11 +01:00
Max Kellermann 07ce915c66 Merge branch 'v0.20.x' 2017-02-08 08:45:24 +01:00
Max Kellermann 81a97315e3 NEWS: mention ID3 memory leak fix 2017-02-08 08:44:47 +01:00
Max Kellermann 45cadef22f configure.ac: prepare for 0.20.5 2017-02-06 23:28:36 +01:00
Max Kellermann df4af2b550 release v0.20.4
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAliSTDkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEsIQD/4iNkylzLp8mID2aFT690MFzv4TRXi2XS7v
 r3Rlx3hpGyDdzeXZeFc5zxsc9Ei8OfLcdFC/Umj9LjQanXakOxwsdhagrW9cadNX
 YLxkyVcREXalmzUvoWeRnya1LjoTdYA8llvG2tAJosXVr0o/GHZi56aHcrYnW2a6
 XD8kEk5k9beuEcBLk1rdZCTGPbVLwCFvMcpZ7j5Hd4kDGQjjw2aoEaPWchJdhLQh
 p+GRSU+A8hyTo9zy+aNO3cKvq6zqVxDLlHnIqh8XPWQoLPyWuD7ETvwERKmdmiPZ
 bSo0MR7azTlhkWbNZxjPHgZuacJDlwKvXPg1ofjn8VVcaVe5ONeX+1WP0ozUYqyU
 fmhLxMHKuwZcKo6do/jNhAVp//VBWhSwJHPA8kjBTuZHHc0HvgyTxlAgvzlrSswe
 dxc8vnvzgJfUKz5k7mf3amVg6Cu1CmNi59CkyL0NL+8N0inyMfdeQuQEYgbPoI6X
 jIRwACfXpMX75VtiDaNpnFLBjL5emE6u2bDoU2c5ezgpthaWjb0PqSmoLBBF8TNm
 k0ecXlIwCjT3pDcqmFdqgG3AJiYLTgX0rETC8PInl6toLzr2oVMVlijU3YK5PjMl
 nTvgs8TwprTWImgcBnidqRMb39p3AKs12pHfZ4Y5Iu82Bm60acZQMkv6sQh43Wyc
 +W2+T3D2IA==
 =b2Fz
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.4'

release v0.20.4
2017-02-01 22:05:33 +01:00
Max Kellermann 0a033fb10a release v0.20.4 2017-02-01 21:59:36 +01:00
Max Kellermann 05eac20ffe lib/nfs/Connection: detect libnfs reconnect
When rpc_reconnect_requeue() gets called from inside nfs_service(),
the NfsInputStream can stall completely because the old socket has
been unregistered from epoll automatically, but the new one has never
been registered.  Therefore, nfs_service() will never be called again.

This kludge attempts to detect this condition by checking
nfs_which_events()==POLLOUT.

https://bugs.musicpd.org/view.php?id=4081
2017-02-01 21:36:58 +01:00
Max Kellermann 38d263ac19 output/sndio: work around a libroar C++ incompatibility
Same as in commit e02d8ad8d2, but this time for the sndio plugin
which can be emulated by libroar.
2017-02-01 19:53:23 +01:00
Thomas Zander 51147203be free() require cstdlib to be included 2017-01-31 21:21:37 +01:00
Max Kellermann a931686317 pcm/SampleFormat: workaround for GCC 4.9 "constexpr" bug
GCC 4.9 has incomplete C++14 support.  Specifically, it doesn't allow
switch/case in "constexpr" functions.
2017-01-27 11:02:58 +01:00
Max Kellermann bb097109f0 configure.ac: prepare for 0.20.4 2017-01-27 08:47:36 +01:00
Max Kellermann 872ecc1aed configure.ac: prepare for 0.21 2017-01-25 08:58:07 +01:00
Max Kellermann 2ab6c40ff1 release v0.20.3 2017-01-25 08:53:16 +01:00
Max Kellermann 32a64481f2 lib/upnp: fix bad std::chrono cast
libupnp provides seconds, not whatever time unit is used by
std::chrono::steady_clock.
2017-01-23 19:16:14 +01:00
Max Kellermann e78ab767d3 db/proxy: make connect errors during startup non-fatal 2017-01-23 18:55:40 +01:00
Max Kellermann c6f89c42b2 db/proxy: make the base class of LibmpdclientError public
If the base class is not accessible, the "catching" the base class
won't work.  This caused the fatal error:

 terminate called after throwing an instance of 'LibmpdclientError'
2017-01-23 18:28:40 +01:00
Max Kellermann 5e93cfdd9e output/Source: reset the ReplayGain serials ion OpenFilter()
Each close/open cycle resets the Filter's state, because a new Filter
instance is being created.  That results in the serials
(replay_gain_serial and other_replay_gain_serial) being out of sync
with the internal ReplayGainFilter state.

So instead of initializing those serials once, we need to initialize
them each time we create new ReplayGainFilter instances, i.e. in
OpenFilter().

 https://bugs.musicpd.org/view.php?id=4632
2017-01-23 17:55:04 +01:00
Max Kellermann 33716732a1 pcm/PcmChannels: silence surround channels when converting from stereo
Previously, there was no special code to convert stereo to
multi-channel.  The generic solution for this was to convert to mono,
and then copy the result to all channels.  That's a pretty bad
solution, but at least something which always renders audio.  MPD does
something, instead of failing.

Now that MPD has proper support for multi-channel (by defining the
channel order), we can do better than that.  It is a (somewhat) common
case to play back stereo music on a DAC which can only do
multi-channel.  The best approach here is to copy the stereo channels
to front-left and front-right, and apply the "silence" pattern to all
other channels.
2017-01-19 10:53:41 +01:00