Commit Graph

1245 Commits

Author SHA1 Message Date
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
Max Kellermann d7137586a9 Audio{Format,Parser}: use shortcuts such as "dsd64" in log messages 2017-01-17 22:42:23 +01:00
Max Kellermann dcbab8e37a PlaylistFile: "playlistadd" creates new playlist if it does not exist, as documented 2017-01-16 20:55:19 +01:00
Max Kellermann a83bee993d configure.ac: prepare for 0.20.3 2017-01-16 12:03:22 +01:00
Max Kellermann 96a31f554a release v0.20.2 2017-01-15 01:28:00 +01:00
Max Kellermann d14ec6aea5 output/Thread: reconfigure ConvertFilter for its new input AudioFormat
If the input AudioFormat changes but the out_audio_format doesn't
change (e.g. because there is a fixed "format" setting in this
"audio_output" section), the ConvertFilter needs to be reconfigured.
This didn't happen, resulting in awful static noise after changing
songs.
2017-01-15 01:24:17 +01:00
Max Kellermann e847ddf011 DetachedSong: compare start_time and end_time in IsSame()
This method is used by DecoderControl::IsCurrentSong(), which is used
by the player thread to check whether the current decoder instance can
be reused to seek.  When switching to another song in the same CUE
sheet, previously DetachedSong::IsSame() returned true, and thus the
old decoder instance was used for the new song, not considering the
new end_time.  This led to the old decoder quickly quitting.
2017-01-15 00:54:25 +01:00
Max Kellermann 7e8b448985 input/alsa: set period_size=buffer_size/4
This way, we have four periods instead of the default of two.  With
only two periods, we don't get woken up often enough, and we
frequently encounter buffer overruns.  With four periods, we have more
time to breathe, and the buffer overruns magically disappear.
2017-01-14 21:50:28 +01:00
Max Kellermann 05417049eb input/alsa: clear sockets from within IOThread
Fixes assertion failure in implicit destructor.
2017-01-13 20:17:16 +01:00
Max Kellermann c7b0c46d9f output/recorder: fix typo in variable name
Fixes the dreaded error "Failed to create : No such file or
directory".

 https://bugs.musicpd.org/view.php?id=4625
2017-01-12 21:36:32 +01:00
Max Kellermann 70008c47c9 output/alsa: support DSD_U16 2017-01-11 22:47:21 +01:00