Max Kellermann
dad7d7e798
util/TruncateString: rename CopyString() to CopyTruncateString()
2017-07-05 17:15:58 +02:00
Max Kellermann
4b94ae8040
util/StringUtil: move CopyString() to TruncateString.cxx
2017-07-05 17:11:34 +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
a057b4f6d8
*: add lost of "noexcept" specifications
2017-06-04 12:46:48 +02:00
Max Kellermann
dd29e6e475
output/pulse: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:17:04 +02:00
Max Kellermann
ae4b30a697
output/httpd: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:13:41 +02:00
Max Kellermann
353299168a
output/Thread: skip WaitForDelay() after resuming playback
...
This allows removing the "base.pause" check from the JACK output
plugin, and will allow removing similar accesses from other plugins.
2017-05-23 11:00:28 +02:00
Max Kellermann
59e4f1ee0f
*: remove lots of GCC 4.8 fallback code
...
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
0a3a5a7c65
Merge branch 'v0.20.x'
2017-05-16 10:09:20 +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
c5996c0593
*: add "noexcept" to many, many function prototypes
...
See commit 71f0ed8b74
2017-05-15 23:05:45 +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
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
71f0ed8b74
*: add "noexcept" to many, many function prototypes
...
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
89b900432e
output/Internal: move thread-specific stuff to AudioOutputControl
...
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann
f6e428ac22
Merge branch 'v0.20.x'
2017-04-24 11:44:27 +02:00
Bart Nagel
ccb4f44caf
Add support for the OriginalDate tag
...
See https://picard.musicbrainz.org/docs/mappings/
This tag is useful when the user would like all releases of the same
album to be sorted next to each other.
2017-04-21 09:43:26 -07:00
Bart Nagel
0a7d612f41
Remove some redundant code
2017-04-18 16:10:38 +02:00
Max Kellermann
f85d4d28d1
output/alsa: work around dmix non-blocking snd_pcm_drain() bug
...
See code comment. Bug was reported against MPD, but it's really an
alsa-lib bug.
https://bugs.musicpd.org/view.php?id=4662
2017-03-29 20:36:04 +02:00
Max Kellermann
dae8b78569
output/httpd: copy the Page reference; fixes use-after-free
2017-03-29 20:17:09 +02:00
François Revol
46aa4d2f91
haiku: fix build
...
Some missing bits when converted to C++ exceptions...
2017-02-20 11:25:00 +01:00
Max Kellermann
512e81c629
output/httpd: use emplace() instead of push()
2017-02-19 20:48:17 +01:00
Max Kellermann
452666f742
output/httpd: wake up the I/O thread only if pages have been read from encoder
2017-02-19 20:46:20 +01:00
Max Kellermann
72008d951b
output/httpd: no mutex lock while reading data from encoder
2017-02-19 20:45:16 +01:00
Max Kellermann
72146e7800
output/httpd: use std::lock_guard
2017-02-19 20:43:45 +01:00
Max Kellermann
f7af1bb8e2
output/httpd: cancel the DeferredMonitor in Close()
2017-02-19 20:41:34 +01:00
Max Kellermann
f88f1fca3f
output/httpd: move Close() lock into the I/O thread
...
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann
26e4a40cc7
output/httpd/Page: use std::shared_ptr instead of class RefCount
2017-02-19 20:17:57 +01:00
Max Kellermann
8b1931072a
output/httpd/Page: no variable size, use AllocatedArray
...
Using variable-size objects is not worth the trouble here. Let's drop
this and use existing and simpler code.
2017-02-19 20:13:41 +01:00
Max Kellermann
45e15b6cc6
output/httpd/Page: make all attributes private
2017-02-19 20:13:35 +01:00
Max Kellermann
be7e52c882
output/httpd/Page: remove unused method Concat()
2017-02-19 20:13:19 +01:00
Max Kellermann
4162ce0bc5
output/httpd/Page: use uint8_t instead of unsigned char
2017-02-19 19:49:53 +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
a73195b7cc
output/httpd/IcyMetaDataServer: pad the string with 15 spaces
...
Fixes a buffer overflow due to the bad formula rounding the buffer
size up. At the same time, remove the "+1" from the meta_length
calculation, which takes the padding into account and at the same time
implements proper rounding.
2017-02-19 19:27:37 +01:00
Max Kellermann
1bd00b8a9a
output/httpd/IcyMetaDataServer: remove the int cast
...
Why did this cast exist??
2017-02-19 19:27:37 +01:00
Max Kellermann
47dffe66aa
output/alsa: fix race condition on early snd_pcm_writei() error
...
During UnlockActivate() while the mutex is unlocked, the IOThread can
set a new error condition, and will never again wake up the
OutputThread. This race condition can cause a deadlock in the
OutputThread.
2017-02-15 11:23:44 +01:00
Max Kellermann
4a80e9cb25
output/alsa: copy the PcmExport result to the ring_buffer
...
.. and not the input data.
Regression from commit b1c7649edb
(integer underflow).
https://bugs.musicpd.org/view.php?id=4639
2017-02-10 22:23:00 +01:00
Max Kellermann
cfd056231b
output/alsa: use the EventLoop& parameter instead of io_thread_get()
2017-02-10 21:21:15 +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
03a97d87ea
tag/Tag*: rename several source files
2017-02-08 08:49:42 +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
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
Max Kellermann
8fd9d91974
output/Plugin: pass EventLoop& to init()
...
Eliminate dependency on io_thread_get().
2017-01-25 22:54:41 +01:00
Max Kellermann
d3f35dab1e
output/ao: convert to class, make attributes private
2017-01-25 10:46:09 +01:00
Max Kellermann
487e2618cd
output/ao: use AudioOutputWrapper
2017-01-25 10:45:20 +01:00
Max Kellermann
30d5186db4
output/ao: use const_cast instead of the union hack
2017-01-25 10:44:19 +01:00
Max Kellermann
cbe59714d4
output/solaris: convert to class, make attributes private
2017-01-25 10:33:38 +01:00
Max Kellermann
704a28ca17
output/solaris: use AudioOutputWrapper
2017-01-25 10:29:42 +01:00
Max Kellermann
8d70d10aba
output/httpd: use AudioOutputWrapper
2017-01-25 10:05:08 +01:00