Max Kellermann
23adf50194
queue/IdTable: make "data" pointer const
2017-11-26 12:24:24 +01:00
Max Kellermann
0691ecc052
queue/IdTable: add "noexcept"
2017-11-26 12:23:46 +01:00
Max Kellermann
d917f44b5b
Queue: make configuration attributes const
2017-11-26 12:22:50 +01:00
Max Kellermann
602bb7170a
Queue: use C++11 initializer
2017-11-26 12:21:36 +01:00
Max Kellermann
75582d47b9
SongSave: wrap DetachedSong* in std::unique_ptr
2017-11-26 12:18:31 +01:00
Max Kellermann
28fdf1e9ed
decoder/Control: wrap DetachedSong* in std::unique_ptr
2017-11-26 12:16:53 +01:00
Max Kellermann
9a8a3beae4
decoder/Control: add "noexcept"
2017-11-26 12:16:53 +01:00
Max Kellermann
2a774a1fea
playlist/{flac,m3u}: use std::make_unique
2017-11-26 12:10:33 +01:00
Max Kellermann
b13b023c6b
player/Control: wrap DetachedSong* in std::unique_ptr
2017-11-26 12:06:38 +01:00
Max Kellermann
b652ad9568
queue/Playlist: cast next_song to bool, because that is all we need in SyncWithPlayer()
2017-11-26 12:06:29 +01:00
Max Kellermann
624e679e35
player/Control: add "noexcept"
2017-11-26 12:02:08 +01:00
Max Kellermann
618704f504
thread/*: add "noexcept"
2017-11-26 11:58:53 +01:00
Max Kellermann
3b3ec402d6
command/CommandListBuilder: use C++11 initializer
2017-11-26 11:11:36 +01:00
Max Kellermann
2b3c1d640e
release v0.20.12
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAloZt0YQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFElF7D/9DIkK8ArcrqtGvLQFseOucf0FPmAD7csoq
oDN4TL8UGUSYxcSt3wQqt6rp5JyWAFTuXPpneytqkZ0tW04y4kkvmIrRkYzuBLgt
yupg1G5fRmidwcqdnb6LqgSdW66pY3U6keaED7LVnMrJbd5MM8R7FejiZFoWmD4C
c9pUU79MbeRk0w2F9Ws0bkd+yU7lUiolcqOg2VK25MZnObI7qf+/fIKOVK0Q9Q2W
AdHLHNliySYPBT/po5YN+VAWPcxSFHXkfN552x0N/U1D/klPLmP1q724frFT+DRQ
vXC5ojDDmSc+uUGr8D5IESfzMOPFj5ag0SqPSNe7Cp5amcy/chNqmo/XKEGqtB+X
BI/DfRHEPGz5wtz6x+AcxFdE6LBAjMpQ2H3ybxGDK1396dNsngAA/g8eyvnzie/2
USQO10O9Ymhezt7lMqhMLxJC/5Q0JLsKRIgqCxABQfTh14JF+c5bkT3zetabA87r
CSyHGr3+tN4KtSJwefGjaGTCy5lN1SB8bRgWVLVVpPYAvtsNS1LwwTyeI3AtYmxr
fylkATAHawSXzdgxgzFA8GmscxaxO/gLud+9ekb33ZIq9bnXiOXpY5u98bxCPWkn
JgzeC4E6xnI3Ft+Ss7Bu0zOgSl2jUiOV7zAy7z8Lo9Qv6QYuIvSi9m+Snxstkul0
9QwG6bA+YA==
=BUsZ
-----END PGP SIGNATURE-----
Merge tag 'v0.20.12'
release v0.20.12
2017-11-25 19:47:56 +01:00
Max Kellermann
714011c81e
lib/upnp: adapt to libupnp 1.8 API changes
...
Closes #155
2017-11-16 11:39:11 +01:00
Max Kellermann
952ff4207b
lib/upnp/Callback: make "evp" parameter const
2017-11-16 11:37:58 +01:00
Max Kellermann
150b16ec2c
lib/upnp/Discovery: make Upnp_Discovery pointers const
2017-11-16 11:37:04 +01:00
Max Kellermann
f70b4e02c4
Merge branch 'v0.20.x'
2017-11-14 21:21:14 +01:00
Max Kellermann
c98bc4a243
playlist/PlaylistRegistry: use LockRewind() instead of Rewind()
...
Fixes a deadlock caused by commit
31ab78ae8e
. That commit was not
actually bad - just these two calls have always been bad, which went
unnoticed for a long time.
2017-11-14 21:19:22 +01:00
Max Kellermann
7d579e7400
lib/alsa/NonBlock: throw exception on error
...
Avoid another potential deadlock: if no file descriptors are
registered, our non-blocking ALSA code cannot ever work.
2017-11-14 21:08:07 +01:00
Max Kellermann
e0f777d4eb
output/alsa: move code to LockCaughtError()
2017-11-14 21:07:59 +01:00
Max Kellermann
febd1ad09c
output/alsa: fix deadlock bug
...
After UnlockActivate() returns, we not only need to check for errors,
but also for more room in the ring buffer. If we don't check the ring
buffer, it may be drained already, and the cond.wait() call will never
finish.
Closes #151
2017-11-14 21:02:53 +01:00
Max Kellermann
1040b85785
lib/{curl,upnp}: add more exception handlers
...
Bugs found by Coverity.
2017-11-14 20:05:44 +01:00
Max Kellermann
e2c81aa9ea
Merge branch 'v0.20.x'
2017-11-14 12:31:13 +01:00
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
f82e1453e4
input/smbclient: use std::lock_guard
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
4b2b89eb5e
lib/xiph: add "noexcept"
2017-11-12 18:35:49 +01:00
Max Kellermann
4b2bb88375
lib/upnp: add "noexcept"
2017-11-12 18:33:58 +01:00
Max Kellermann
fb01e41e8a
lib/sqlite: add "noexcept"
2017-11-12 18:26:03 +01:00
Max Kellermann
ff9759c09d
lib/pulse: add "noexcept"
2017-11-12 18:25:16 +01:00
Max Kellermann
a92e0e8540
lib/nfs: add "noexcept"
2017-11-12 18:09:07 +01:00
Max Kellermann
9d47b220a4
lib/curl: add "noexcept"
2017-11-12 17:49:58 +01:00
Max Kellermann
c582a9faae
event/MultiSocketMonitor: add "noexcept"
2017-11-12 17:42:50 +01:00
Max Kellermann
cf483107c9
event/IdleMonitor: add "noexcept"
2017-11-12 17:40:25 +01:00
Max Kellermann
b57e2f5521
event/DeferredMonitor: eliminate obsolete class
...
Move its code to DeferEvent instead.
2017-11-12 17:34:06 +01:00
Max Kellermann
bf3ced6a34
event/Call: migrate from DeferredMonitor to DeferEvent
2017-11-12 17:32:23 +01:00
Max Kellermann
390e830994
{mixer,output}/alsa: migrate from DeferredMonitor to DeferEvent
2017-11-12 17:27:58 +01:00
Max Kellermann
44c60567dd
output/alsa: add "allowed_formats" setting
...
Allows defining a list of supported audio formats, and allows
switching on and off DoP with certain formats.
This is a first rough draft. The setting syntax and its semantics may
still be redesigned.
2017-11-10 23:05:50 +01:00
Max Kellermann
967d81b782
AudioFormat: add method MatchMask()
2017-11-10 23:05:50 +01:00
Max Kellermann
20199e770c
output/shout: use the shout_metadata_t only once
...
There is no documentation on whether calling shout_metadata_add()
multiple times on one instance is allowed. To be sure, let's allocate
the object on demand each time in SendTag().
2017-11-10 22:30:53 +01:00
Max Kellermann
4c824e5309
output/shout: simplify shout_tag_to_metadata()
2017-11-10 22:26:25 +01:00
Max Kellermann
981bc85879
output/shout: relax quality and bitrate checks, forward as-is
2017-11-10 22:19:00 +01:00
Max Kellermann
015527d870
output/shout: make "quality" and "bitrate" local variables
2017-11-10 22:17:51 +01:00
Max Kellermann
6464b4b372
encoder/Configured: glue code to initialize PreparedEncoder
2017-11-10 21:54:57 +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
13816c1c7d
output/{recorder,httpd,shout}: use std::unique_ptr to manage PreparedEncoder pointer
2017-11-10 21:35:22 +01:00
Max Kellermann
c54a920d13
output/httpd: make enum strictly-typed
2017-11-10 21:25:03 +01:00
Max Kellermann
83f8eeec44
output/httpd: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:18:00 +01:00
Max Kellermann
b83fbad6a1
output/httpd: use C++11 initializers
2017-11-10 21:15:57 +01:00
Max Kellermann
ec20784046
storage/curl: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:10:54 +01:00
Max Kellermann
42ad753e39
event/MaskMonitor: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:10:46 +01:00
Max Kellermann
1ccd2a7b11
lib/nfs: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:06:40 +01:00
Max Kellermann
4c1d29c86c
lib/nfs/FileReader: use C++11 initializers
2017-11-10 21:03:41 +01:00
Max Kellermann
0db7a0c9e2
db/update/Service: migrate from DeferredMonitor to DeferEvent
2017-11-10 20:58:25 +01:00
Max Kellermann
13f6b1b344
db/update/Remove: migrate from DeferredMonitor to DeferEvent
2017-11-10 20:56:21 +01:00
Max Kellermann
593d82c6a9
event/DeferEvent: add "noexcept"
2017-11-10 20:55:24 +01:00
Max Kellermann
43dccbd45d
event/SocketMonitor: remove unused method Abandon()
2017-11-10 20:52:37 +01:00
Max Kellermann
0ff4350352
event/ServerSocket: pass UniqueSocketDescriptor by value
...
Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
2017-11-10 20:43:14 +01:00
Max Kellermann
5fd2b7cc79
event/SocketMonitor: eliminate Read(), Write()
...
Migrate callers to GetSocket().Read(), GetSocket.Write(), which is the
same.
2017-11-10 20:37:52 +01:00
Max Kellermann
7e16ac305d
event/SocketMonitor: rename Get() to GetSocket()
2017-11-10 20:34:45 +01:00
Max Kellermann
59a8836924
event/SocketMonitor: add "noexcept"
2017-11-10 20:20:07 +01:00
Max Kellermann
9d4020501c
event/SocketMonitor: make constructor "explicit"
2017-11-10 20:17:27 +01:00
Max Kellermann
81350d65bc
event/SocketMonitor: use C++11 initializers
2017-11-10 20:16:26 +01:00
Max Kellermann
02642a64fd
input/Plugin: remove "#undef ERROR"
...
Maybe this was once a required kludge for Windows, but it's not
anymore.
2017-11-10 19:59:03 +01:00
Max Kellermann
3c41e9f022
evnet/SocketMonitor: move WIN32/ERROR comment to PollGroupWinSelect.hxx
2017-11-10 19:57:54 +01:00
Max Kellermann
2670e13cbd
util/{Const,Writable}Buffer: add static_assert to FromVoid()
2017-11-10 19:43:17 +01:00
Max Kellermann
49784513b1
util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL
2017-11-10 19:24:33 +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
55e6629fb4
output/Control: catch and log StartThread() exceptions
2017-10-30 08:39:44 +01:00
Max Kellermann
b6251c6968
pcm/Export: add "noexcept"
2017-10-26 12:29:13 +02:00
Max Kellermann
c51fe089ba
pcm/Dop: add "noexcept"
2017-10-26 12:28:59 +02:00
Max Kellermann
fee9f1482c
pcm/Pack: add "noexcept"
2017-10-26 12:28:21 +02:00
Max Kellermann
ae67f44c6e
pcm/Dsd*: add "noexcept"
2017-10-26 12:26:50 +02:00
Max Kellermann
54dd1ad09b
pcm/Order: add "noexcept"
2017-10-26 12:25:38 +02:00
Max Kellermann
e2a74051dc
lib/alsa/HwSetup: return effective parameters
2017-10-26 12:13:00 +02:00
Max Kellermann
b7e035b6f3
output/alsa: move AlsaSetupHw() to lib/alsa/HwSetup.cxx
2017-10-26 11:15:01 +02:00
Max Kellermann
890f1f5928
lib/alsa/Format: move HAVE_ALSA_DSD* definitions from the Alsa output plugin
2017-10-26 09:39:18 +02:00
Max Kellermann
b30c37eb79
output/alsa: move functions to lib/alsa/Format.hxx
2017-10-26 09:30:45 +02:00
Max Kellermann
b08cb148ae
output/alsa: move class PeriodBuffer to lib/alsa/PeriodBuffer.hxx
2017-10-26 09:27:36 +02:00
Max Kellermann
034bb13e1c
util/HugeAllocator: add missing "static inline"
...
Fixes the non-Linux build.
2017-10-26 09:01:06 +02:00
Max Kellermann
6657801fb1
output/alsa: pass SampleFormat& to AlsaSetupFormat()
2017-10-26 08:46:28 +02:00
Max Kellermann
a199366157
output/alsa: remove period_time adjust loop
...
This loop was introduced in commit
24c1f46353
, but -EPIPE is not a possible
error condition for snd_pcm_hw_params(). This code does not appear to
make sense. Problems with a wrong period_time should be caught before
that by snd_pcm_hw_params_set_period_time_near().
This commit removes the last "goto" in MPD! Yay!
2017-10-26 08:40:59 +02:00
Max Kellermann
2a6d5583d1
lib/alsa: add "noexcept"
2017-10-26 08:24:14 +02:00
Max Kellermann
ddabe1a6df
output/alsa: add "noexcept"
2017-10-26 08:18:05 +02:00
Max Kellermann
e7b47ce335
output/alsa: in_frame_size is a debug-only variable
2017-10-26 08:17:21 +02: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
ff162b5a03
input/curl: move code to StartRequest()
2017-10-24 21:41:17 +02:00
Max Kellermann
d8e4705dd4
input/curl: move the range buffer to the stack
...
From the CURLOPT_RANGE documentation: "The application does not have
to keep the string around after setting this option."
2017-10-24 21:38:35 +02:00
Max Kellermann
ab05b70423
ClientProcess: close connection when client sends HTTP request
2017-10-24 20:32:53 +02:00
Max Kellermann
b177bffa6a
system/EventPipe: fix WSAEINPROGRESS on Windows
...
Apparently, connecting a socket to a loopback address can block on
Windows, and a non-blocking socket will return WSAEINPROGRESS. This
broken PoorSocketPair() in commit 2119e4fd3e
, which made the socket
non-blocking right from the start. This fix postpones the
ioctlsocket(FIONBIO) call until after the connect().
Closes #134
2017-10-24 20:09:11 +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
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
753a2aa462
PlaylistSave: move code to playlist_print_path()
2017-10-18 09:51:04 +02:00
Max Kellermann
10990a0684
queue/Playlist: call MoveOrderToCurrent() in SeekSongOrder() on song change
...
Applies the improvements from the previous commit to the "seek"
commands, which are also capable of switching songs.
Closes #119
2017-10-18 09:14:27 +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
0f79287b04
queue/Playlist: move code to MoveOrderToCurrent()
2017-10-18 09:05:24 +02:00
Max Kellermann
f2fac77d8c
queue/Queue: add methods MoveOrderBefore() and MoveOrderAfter()
2017-10-18 08:50:01 +02:00
Max Kellermann
81b7373637
queue/Queue: MoveOrder() returns to_order
2017-10-18 08:46:31 +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
John Regan
bd50a0d2ef
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-26 08:42:53 -05:00
John Regan
9256e748c8
GME Plugin: only load m3u if it exists
...
If you load an NSFE file (which has embedded track titles),
then attempt to load an M3U file, it causes GME to lose all
information found in the NSFE file. This adds a check that
the M3U file exists before attempting to load.
2017-09-26 08:42:43 -05:00
John Regan
e96513c8db
GME Plugin: try loading m3u sidecar files
2017-09-22 19:58:17 +02:00
Max Kellermann
da9657aac4
playlist/SoundCloud: move enum key into struct, make strictly-typed
2017-09-21 23:10:11 +02:00
Max Kellermann
2886766fb5
playlist/SoundCloud: use strcmp() instead of memcmp() to avoid buffer overflow
2017-09-21 23:08:27 +02:00
Max Kellermann
6e7f866288
input/alsa: migrate from DeferredMonitor to DeferEvent
2017-09-21 22:58:00 +02:00
Max Kellermann
6fa403edd9
lib/upnp/Discovery: migrate from DeferredMonitor to DeferEvent
2017-09-21 22:53:57 +02:00
Max Kellermann
431eb7bc8c
lib/curl/{Global,Request}: migrate from DeferredMonitor to DeferEvent
2017-09-21 22:53:17 +02:00
Max Kellermann
9df4853e23
event/DeferredCall: rename to DeferEvent
2017-09-21 22:40:25 +02:00
Max Kellermann
18c4ef09d5
input/thread: use class HugeArray instead of the low-level function HugeAllocate()
2017-09-21 21:56:24 +02:00
Max Kellermann
bc93c7a1fc
input/thread: un-inline the constructor
2017-09-21 21:55:24 +02:00
Max Kellermann
c8a2a557db
util/HugeAllocator: remove obsolete class HugeAllocation
2017-09-21 21:52:08 +02:00
Max Kellermann
9f827c99cb
input/async: use class HugeArray instead of HugeAllocation
2017-09-21 21:50:45 +02:00
Max Kellermann
7b2b965415
util/SliceBuffer: use class HugeArray
2017-09-21 21:48:08 +02:00
Max Kellermann
c3cfa18ebe
util/HugeAllocator: add template class HugeArray
2017-09-21 21:47:52 +02:00
Max Kellermann
b46835e15e
util/HugeAllocator: HugeAllocator() returns WritableBuffer<void>
2017-09-21 21:47:49 +02:00
Max Kellermann
3e5ce3c92c
util/{Const,Writable}Buffer: add static method FromVoidFloor()
2017-09-21 21:45:39 +02:00
Max Kellermann
e5c9b4cd75
util/{Const,Writable}Buffer: add operator==(nullptr_t)
2017-09-21 20:34:36 +02:00
Max Kellermann
8753e558f2
util/HugeAllocator: move MADV_DONTFORK setting to HugeForkCow()
...
Enforcing MADV_DONTFORK is a surprising limitation for this library
which aims to be generic.
2017-09-21 19:36:33 +02:00
Max Kellermann
f6691579de
Merge branch 'v0.20.x'
2017-09-20 23:57:28 +02:00
Max Kellermann
828f5f8384
lib/icu/CaseFold: disable broken strxfrm() callback
2017-09-20 23:55:14 +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
66646d9276
SongFilter: use class IcuCompare
2017-09-20 23:43:26 +02:00
Max Kellermann
d0497dba92
lib/icu/Compare: OO wrapper for IcuCaseFold()
2017-09-20 23:32:55 +02:00
Max Kellermann
42914e8227
lib/icu/CaseFold: add "noexcept"
2017-09-20 23:32:54 +02:00
Max Kellermann
59b49b7881
db/Selection: add missing config.h
2017-09-20 23:32:54 +02:00
Max Kellermann
5620f16330
lib/icu/Collate: move IcuCaseFold() to CaseFold.cxx
2017-09-20 23:11:58 +02:00
Max Kellermann
be024d4ad7
lib/icu/Collate: remove unnecessary assert()
2017-09-20 23:05:31 +02:00
Max Kellermann
cfc152d979
input/async: remove outdated API documentation
2017-09-19 19:56:37 +02:00
Max Kellermann
513212c5e8
input/async: use std::exchange()
2017-09-19 19:55:16 +02:00
Max Kellermann
99a447dff5
input/async: use C++11 initializers
2017-09-19 19:54:07 +02:00
Max Kellermann
56a9bf459d
util/SliceBuffer: use C++11 initializers
2017-09-19 19:48:04 +02:00
Max Kellermann
11dbba3503
util/HugeAllocator: document std::bad_alloc
2017-09-19 19:45:52 +02:00
Max Kellermann
8662427d48
util/HugeAllocator: use std::exchange()
2017-09-19 19:42:21 +02:00
Max Kellermann
821480d329
util/HugeAllocator: make constructor explicit
2017-09-19 19:42:19 +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
735eabb066
output/sndio: move #include below guard
2017-09-19 18:59:04 +02:00
Max Kellermann
412ff762bb
output/sndio: use forward declarations
2017-09-19 18:58:13 +02:00
Max Kellermann
44bbf42a9f
Merge branch 'v0.20.x'
2017-09-19 18:58:02 +02:00
Max Kellermann
75c740fe2b
output/sndio: fix indent
2017-09-19 18:50:35 +02:00
Max Kellermann
6c8d86bb90
output/sndio: rename the "sio_hdl" variable to avoid clash with struct name
2017-09-19 18:49:33 +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
Christopher Zimmermann
030f87c90c
Add sndio mixer plugin
2017-09-16 11:58:33 +02:00
Christopher Zimmermann
ae941a7665
SndioOutput: Move class definition to header
...
no change in behaviour.
2017-09-16 09:14:56 +02:00
Christopher Zimmermann
4d563e08e1
Fix building on BSDs
2017-09-16 09:14:11 +02:00
Max Kellermann
8a81b986c0
net/AllocatedSocketAddress: pass SocketAddress by value to operator!=
2017-09-13 17:51:51 +02:00
Max Kellermann
a6e62479be
system/Error: include cleanup
2017-09-13 17:49:37 +02:00
Max Kellermann
6c825064ea
system/Error: add more "noexcept"
2017-09-13 17:48:13 +02:00
Max Kellermann
13d02968bd
system/FileDescriptor: Close() should not be called on undefined object
...
It does not do much harm - but it causes an unnecessary (failing)
system call.
2017-09-13 17:43:13 +02:00
Max Kellermann
e576556149
system/UniqueFileDescriptor: remove duplicate "using" statements
2017-09-13 17:41:15 +02:00
Max Kellermann
66e74900df
system/UniqueFileDescriptor: expose CheckDuplicate()
2017-09-13 17:40:33 +02:00
Max Kellermann
aadc735d71
system/FileDescriptor: mention class UniqueFileDescriptor in API documentation
2017-09-13 17:39:29 +02:00
Max Kellermann
a13897cf6f
system/FileDescriptor: add CheckDuplicate()
2017-09-13 17:37:28 +02:00
Max Kellermann
b188ae0e5c
system/FileDescriptor: use _WIN32 instead of WIN32
2017-09-13 17:36:48 +02:00
Max Kellermann
c196710fae
util/WStringCompare: relicense to BSD-2
2017-09-13 16:43:41 +02:00
Max Kellermann
e4f62483ff
util/StringView: add default constructors
...
It was implicitly deleted since commit
db23c2f27b
2017-09-13 12:59:31 +02:00
Max Kellermann
8d9347edc5
Util/WStringCompare: use struct WStringView
2017-09-13 11:47:48 +02:00
Max Kellermann
eff821c1ca
Util/StringView: move struct WStringView to separate header
2017-09-13 11:22:59 +02:00
Max Kellermann
3bcd6ecbad
util/Exception: update API documentation
2017-09-13 10:49:34 +02:00
Max Kellermann
e76f4c2ae9
util/DeleteDisposer: convert struct to class
2017-09-13 10:35:51 +02:00
Max Kellermann
f46ac45d69
util/*: update include guards
2017-09-13 10:35:11 +02:00
Max Kellermann
1d1259a86d
util/AllocatedString: add method data()
2017-09-13 10:34:12 +02:00
Max Kellermann
101f08ca75
util/Cast: make the "member" pointer const
2017-09-13 10:32:55 +02:00
Max Kellermann
3b7f9827ab
Util/IterableSplitString: add wchar_t specialization
2017-09-12 19:12:09 +02:00
Max Kellermann
f98bf39005
Util/IterableSplitString: add template class BasicIterableSplitString
2017-09-12 19:12:09 +02:00
Max Kellermann
9e7df54ccd
Util/StringView: add struct TStringView
2017-09-12 19:12:09 +02:00
Max Kellermann
db23c2f27b
util/StringView: allow casting from BasicStringView to StringView
2017-09-12 19:08:47 +02:00
Max Kellermann
9744f437d8
Util/CharUtil: add wchar_t overloads
...
Needed for WStringView.
2017-09-12 18:22:02 +02:00
Max Kellermann
01f84b0e53
util/StringView: add struct WStringView
2017-09-12 17:17:13 +02:00
Max Kellermann
5dbdd36263
util/StringView: add struct BasicStringView
2017-09-12 17:17:13 +02:00
Max Kellermann
96b557c1f0
util/StringView: remove methods SetEmpty(), Empty()
2017-09-12 17:17:13 +02:00
Max Kellermann
ebdb7c8de2
util/WStringAPI: add StringIsEqualIgnoreCase() overload
2017-09-12 17:17:13 +02:00
Max Kellermann
1fda842ee6
util/StringView: use StringAPI.hxx
2017-09-12 17:00:42 +02:00
Max Kellermann
f71e20d0ce
util/StringView: use value_type
2017-09-12 17:00:38 +02:00
Max Kellermann
988680de33
util/StringView: remove unnecessary operator= overloads
...
These will be generated by the compiler automatically.
2017-09-12 17:00:02 +02:00
Max Kellermann
cdf92c6300
util/StringView: remove redundant template parameters
2017-09-12 16:57:19 +02:00
Max Kellermann
be5b726c0a
util/StringView: remove Literal()
...
This is not necessary, because a strlen() on a literal gets optimized
away by the compiler.
2017-09-12 16:55:10 +02:00
Max Kellermann
3491218915
db/update/Service: use C++11 initializers
2017-09-09 07:59:51 +02:00
Max Kellermann
d0f6131ba4
output/Interface: allow Pause() to throw exception
...
Coverity discovered that the Pulse plugin could throw exceptions from
Pause(), but that method was marked "noexcept" because its caller was
not designed to catch exceptions. So instead of avoiding exceptions
(by catching and logging them in each and every implementation), let's
allow them, and do the catch/log game in the MPD core.
2017-09-08 14:45:53 +02:00
Max Kellermann
9cc37bdea2
command/PlayerCommands: emit "volume" only if it is known
...
The "-1" magic value is deprecated now.
2017-09-04 08:37:37 +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
cbb9b6957f
storage/curl: use StringStartsWith()
2017-09-01 11:31:10 +02:00
Max Kellermann
f6b56c9317
storage/curl: move code to IsXmlContentType()
2017-09-01 11:30:30 +02:00
Max Kellermann
91438b6540
output/Interface: the default Pause() implementation fails
...
Fixes regression from commit 31bad5f7af
:
if Pause() returns true, the output thread is running a busy loop,
causing 100% CPU usage, instead of just closing the output.
Closes #105
2017-08-31 15:02:15 +02:00
Max Kellermann
987c505906
event/TimeoutMonitor: remove obsolete class
2017-08-29 16:53:15 +02:00
Max Kellermann
598bb93cc2
StateFile: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:52:02 +02:00
Max Kellermann
dc531b64ae
db/update/InotifyQueue: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:38:50 +02:00
Max Kellermann
91d4b5cfed
lib/nfs/Connection: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:36:16 +02:00
Max Kellermann
c24b8460e0
lib/curl/Global: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:33:20 +02:00
Max Kellermann
2e471daef1
storage/nfs: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:30:50 +02:00
Max Kellermann
7ae57a3531
event/MultiSocketMonitor: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
11f36c0bd6
zeroconf/AvahiPoll: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
fd520eeed2
Client: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
30a5dd267b
event/TimeoutMonitor: move code to new class TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
2f0d683378
event/Loop: fix inverted checkin RemoveDeferred()
2017-08-29 16:28:24 +02:00
Max Kellermann
a1309a90ac
event/Loop: use boost::intrusive::list to store IdleMonitors and DeferredMonitors
...
The intrusive contains can easily erase items without searching
through the whole list. This removes a good amount of runtime
overhead.
2017-08-29 15:43:16 +02:00
Max Kellermann
010855a294
event/Loop: use boost::intrusive::multiset to store TimeoutMonitors
...
By using an "intrusive" data structure, we can easily eliminate
struct TimerRecord.
2017-08-29 14:42:59 +02:00
Max Kellermann
71ed3ff992
event/Loop: move TimerRecord::due to class TimeoutMonitor
...
Prepare to eliminate the TimerRecord struct.
2017-08-29 14:13:09 +02:00
Max Kellermann
d4266d0063
event/Loop: remove unused method TimerRecord::IsDue()
2017-08-29 13:41:11 +02:00
Max Kellermann
8225064aab
lib/upnp/Discovery: add missing include
...
Got lost in commit e5ee357903
2017-08-29 13:41:03 +02:00
Max Kellermann
e5ee357903
lib/upnp/Discovery: use DeferredMonitor instead of BlockingCall()
2017-08-25 11:01:30 +02:00
Max Kellermann
8aef518c05
lib/upnp/Discovery: add method GetEventLoop()
2017-08-25 10:59:49 +02:00
Max Kellermann
309ed77ef4
lib/upnp/Device: use std::string::find() instead of ...find_first_of()
2017-08-25 10:57:40 +02:00
Max Kellermann
9a6d2b791f
lib/upnp/Discovery: avoid a std::string copy
2017-08-25 10:55:30 +02:00
Max Kellermann
2a5010a426
lib/upnp/Discovery: remove obsolete comment
2017-08-25 10:16:19 +02:00
Max Kellermann
be29da46f8
lib/upnp/Discovery: use std::list::remove_if()
2017-08-25 10:14:18 +02:00
Max Kellermann
d0734e27ba
lib/upnp/Discovery: use range-based "for"
2017-08-25 10:11:35 +02:00
Max Kellermann
732f6aaa30
neighbor/Explorer: add "noexcept"
2017-08-25 10:09:34 +02:00
Max Kellermann
dd422c7b8b
neighbor/plugins/*: remove redundant "virtual"
2017-08-25 10:07:32 +02:00
Max Kellermann
c8f7a859ea
lib/upnp/Discovery: use CURL instead of UpnpDownloadUrlItem()
...
We can do CURL requests asynchronously, and we don't need a
synchronous WorkQueue thread for that.
This allows parallelizing lookups and allows immediate cancellation.
2017-08-25 09:52:44 +02:00
Max Kellermann
28a2d41b85
db/DatabasePlugin: pass EventThread's EventLoop to create()
...
Allows database plugins to use the EventThread, e.g. for CURL
integration.
2017-08-24 19:53:52 +02:00
Max Kellermann
7e76656a18
db/DatabasePlugin: add #EventLoop parameter documentation
2017-08-24 19:45:23 +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
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
95637fd153
lib/upnp/Discovery: use strncmp() instead of memcmp()
...
memcmp() can overflow the buffer.
2017-08-18 18:48:22 +02:00
Max Kellermann
5ac72211cd
event/Loop: set thread to current thread by default
...
Allows eliminating lots of complexity and workarounds for bogus
assertion failures.
2017-08-18 18:18:55 +02:00
Max Kellermann
94525d3952
IOThread: remove obsolete library
...
We now pass the EventThread's EventLoop reference around.
2017-08-18 18:15:19 +02:00
Max Kellermann
7f9a2f8adb
event/Loop: schedule and cancel the WakeFD in Run()
...
This is only needed while Run() is alive, and moving it there avoids
problems with thread-checking assertions.
2017-08-18 18:08:06 +02:00
Max Kellermann
b7d0890bc0
lib/curl/Init: share a CurlGlobal instance between input and storage
2017-08-18 13:34:55 +02:00
Max Kellermann
b2b079a26b
SongFilter: use std::chrono::system_clock::time_point instead of time_t
2017-08-18 12:30:50 +02:00
Max Kellermann
b886dfae4d
DetachedSong, db/LightSong, db/simple/Song: use std::chrono::system_clock::time_point
2017-08-18 12:22:47 +02:00
Max Kellermann
902fbb3347
db/LightDirectory: use std::chrono::system_clock::time_point
2017-08-18 12:16:43 +02:00
Ryan Walklin
9f16c798d0
Fix std::string read after free in read_stream_art
2017-08-17 21:25:03 +10:00
Ryan Walklin
318f80d113
Fix EventPipe file descriptors
2017-08-17 12:21:01 +10:00
Ryan Walklin
9df8b32f10
Add albumart command
...
Add API documentation
Support 64 bit offsets
Use InputStream for all reads
2017-08-15 20:38:33 +10:00
Max Kellermann
6f37f5752b
db/PlaylistInfo: use std::chrono::system_clock::time_point
2017-08-11 12:50:33 +02:00
Max Kellermann
9d0a71f245
output/Jack: add "noexcept"
2017-08-11 12:41:11 +02:00
Max Kellermann
ff1b435232
output/Jack: reorder methods
2017-08-11 12:39:42 +02:00
Max Kellermann
b57a272f67
system/EPollFD: throw exception instead of raising fatal error
2017-08-11 09:39:47 +02:00
Max Kellermann
ef79647e85
zeroconf/Avahi: throw exception instead of raising fatal error
2017-08-11 09:38:08 +02:00
Max Kellermann
d3fd89552f
unix/Signalhandlers: throw exception instead of raising fatal error
2017-08-11 09:37:30 +02:00
Max Kellermann
6d43e70a93
event/SignalMonitor: throw exception instead of raising fatal error
2017-08-11 09:36:22 +02:00
Max Kellermann
e8333316ee
Permission: throw exception instead of raising fatal error
2017-08-11 09:33:59 +02:00
Max Kellermann
85edcb858d
tag/Config: throw exception instead of raising fatal error
2017-08-11 09:33:07 +02:00
Max Kellermann
bab5f1a93f
client: make GREETING constexpr
2017-08-11 09:22:26 +02:00
Max Kellermann
6de8303df8
client: use C++11 initializers
2017-08-11 09:21:29 +02:00
Max Kellermann
33b4114534
system/fd_util: remove unused library
2017-08-11 09:20:15 +02:00
Max Kellermann
7a4457402f
system/EventPipe: use FileDescriptor::CreatePipeNonBlock()
2017-08-11 09:19:00 +02:00
Max Kellermann
9056dcaf7d
system/FileDescriptor: add method CreatePipeNonBlock()
2017-08-11 09:15:22 +02:00
Max Kellermann
2119e4fd3e
system/EventPipe: use class UniqueSocketDescriptor in PoorSocketPair()
2017-08-11 09:09:04 +02:00
Max Kellermann
bcd5190f1d
system/EventPipe: throw exception instead of raising fatal error
2017-08-11 09:09:04 +02:00
Max Kellermann
d705a92e43
net/IPv4Address: new class
2017-08-11 09:09:04 +02:00
Max Kellermann
614b3634d4
net/SocketDescriptor: add AcceptNonBlock() overload without address
2017-08-11 09:07:35 +02:00
Max Kellermann
b234f4307f
net/SocketDescriptor: AcceptNonBlock() enables non-blocking even if SOCK_NONBLOCK is unavailable
2017-08-11 09:04:38 +02:00
Max Kellermann
e38c213ee0
net/SocketDescriptor: check HAVE_ACCEPT4
2017-08-11 09:04:10 +02:00
Max Kellermann
699f41e114
system/EventPipe: use AtScopeExit() in PoorSocketPair()
2017-08-11 08:30:37 +02:00
Max Kellermann
424e1363ed
zeroconf/Bonjour: pass SocketDescriptor to constructor
...
Fixes Mac build failure.
2017-08-11 08:25:26 +02:00
Max Kellermann
7484bc31b4
system/FileDescriptor: implement CreatePipe() on Windows
2017-08-11 08:15:47 +02:00
Max Kellermann
5a495cc165
system/fd_util: remove unused function close_socket()
2017-08-10 19:47:57 +02:00
Max Kellermann
9ff4717738
system/fd_util: remove unused function accept_cloexec_nonblock()
2017-08-10 19:47:40 +02:00
Max Kellermann
0c1740982d
system/fd_util: remove unused function open_cloexec()
2017-08-10 19:46:23 +02:00
Max Kellermann
3c7c0515d8
output/oss: use class FileDescriptor
2017-08-10 19:42:23 +02:00
Max Kellermann
56cb92fdaf
mixer/oss: use class FileDescriptor
2017-08-10 19:41:22 +02:00
Max Kellermann
c00b6ff999
fs/FileSystem: use UniqueFileDescriptor in TruncateFile()
2017-08-10 19:40:47 +02:00
Max Kellermann
df5cc3f0f6
fs/FileSystem: OpenFile() returns UniqueFileDescriptor
2017-08-10 19:34:52 +02:00
Max Kellermann
eb0ff32efb
system/FileDescriptor: add Open() overload with wchar_t path
2017-08-10 19:34:52 +02:00
Max Kellermann
cf0120e8e0
net/SocketUtil: use SocketDescriptor::SetBoolOption()
2017-08-10 19:30:46 +02:00
Max Kellermann
1f47dc990d
net/SocketDescriptor: add method SetKeepAlive()
2017-08-10 19:25:02 +02:00
Max Kellermann
9a5bcc6db0
net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept()
2017-08-10 19:20:14 +02:00
Max Kellermann
492b20a89d
event/SocketMonitor: use class SocketDescriptor
2017-08-10 19:19:58 +02:00
Max Kellermann
fcfc8bacc0
output/httpd: remove obsolete accept() error check
2017-08-10 19:19:53 +02:00
Max Kellermann
0800d9427c
system/fd_util: remove unused function socket_cloexec_nonblock()
2017-08-10 17:40:14 +02:00
Max Kellermann
4e113a7086
lib/nfs/Connection: use class SocketDescriptor
2017-08-10 17:37:19 +02:00
Max Kellermann
39f422ded8
net/SocketDescriptor: allow constructing with "int"
2017-08-10 17:37:08 +02:00
Max Kellermann
d2cdaa041c
net/SocketDescriptor: SO_REUSEADDR is portable
2017-08-10 13:23:14 +02:00
Max Kellermann
d84dae488e
net/SocketUtil: fix -Wunused
2017-08-10 13:22:00 +02:00
Max Kellermann
79e75bfbb9
net/SocketDescriptor: cast setsockopt() value to "const char *" for Windows
2017-08-10 13:21:24 +02:00
Max Kellermann
73b15c1bee
net/SocketDescriptor: socketpair() is unavailable on Windows
2017-08-10 13:19:47 +02:00
Max Kellermann
b180604422
net/SocketDescriptor: implement SetNonBlocking() on Windows
2017-08-10 13:18:23 +02:00
Max Kellermann
fab12ef241
net/SocketDescriptor: call SetNonBlocking() on Linux if SOCK_NONBLOCK unavailable
2017-08-10 13:16:25 +02:00
Max Kellermann
917881aa48
net/SocketDescriptors: IsValid() is not available on Windows
2017-08-10 13:15:57 +02:00
Max Kellermann
9259e989a4
net/SocketDescriptors: fix includes for Windows
2017-08-10 13:13:19 +02:00
Max Kellermann
da90f484aa
net/SocketUtil: socket_bind_listen() returns UniqueSocketDescriptor
2017-08-10 13:12:13 +02:00
Max Kellermann
817e912025
net/SocketDescriptor: specialization of FileDescriptor for network sockets
2017-08-10 13:12:13 +02:00
Max Kellermann
7f83d38bca
net/StaticSocketAddress: add struct sockaddr cast operators
2017-08-10 13:12:13 +02:00
Max Kellermann
54de8b8e77
net/*, ...: use AF_LOCAL instead of AF_UNIX
2017-08-10 13:12:13 +02:00
Max Kellermann
796956970e
net/StaticSocketAddress: pass SocketAddress by value to operator!=
2017-08-10 13:12:13 +02:00
Max Kellermann
c0020142da
net/StaticSocketAddress: add method SetMaxSize()
2017-08-10 13:12:13 +02:00
Max Kellermann
ee6eea95af
net/StaticSocketAddress: set a valid size in Clear()
2017-08-10 13:12:13 +02:00
Max Kellermann
a257504ba4
mixer/Plugin: pass AudioOutput to init()
...
Fix breakage from commit bea5681fd8
2017-08-10 13:07:36 +02:00
Max Kellermann
fb0dbce15b
system/EventFD: use class UniqueFileDescriptor
2017-08-10 12:14:56 +02:00
Max Kellermann
8333551331
system/SignalFD: use class UniqueFileDescriptor
2017-08-10 12:13:41 +02:00
Max Kellermann
292d794806
system/UniqueFileDescriptor: new auto-closing FileDescriptor wrapper
2017-08-10 12:01:17 +02:00
Max Kellermann
91ce76af9d
system/FileDescriptor: add methods EnableCloseOnExec(), DisableCloseOnExec()
2017-08-10 11:54:26 +02:00
Max Kellermann
33bd9e80bb
system/FileDescriptor: add method IsReadyForWriting()
2017-08-10 11:53:43 +02:00
Max Kellermann
d310f3e9b7
system/FileDescriptor: add method IsValid()
2017-08-10 11:52:22 +02:00
Max Kellermann
8c832f4c50
system/FileDescriptor: use std::exchange()
2017-08-10 09:55:11 +02:00
Max Kellermann
31bad5f7af
output/Interface: convert to abstract class
...
Yet another C-style vtable replaced with C++.
2017-08-10 09:01:41 +02:00
Max Kellermann
1cf7f3d87c
output/Solaris: use class FileDescriptor
2017-08-10 08:56:56 +02:00
Max Kellermann
9c9a9ccd5c
output/Interface: convert to class, make attributes private
2017-08-09 17:03:07 +02:00
Max Kellermann
7381236de6
output/Interface: remove unused attribute "parent"
2017-08-09 17:03:00 +02:00
Max Kellermann
fe9ffcb9d2
Merge branch 'v0.20.x'
2017-08-08 19:30:30 +02:00
Max Kellermann
bea5681fd8
output/Interface: define a new struct AudioOutput
...
Hide struct FilteredAudioOutput from the plugins, preparing for hiding
MPD's core internals.
2017-08-08 18:58:40 +02:00
Max Kellermann
e11229494e
output/Filtered: add method NeedFullyDefinedAudioFormat()
...
Avoid accessing FilteredAudioFormat attributes directly.
2017-08-08 18:57:59 +02:00
Max Kellermann
ccc0fcb5b7
output/Shout: move ConfigureShoutAudioInfo() call to Open()
...
Configure the AudioFormat after opening the encoder, because only now
we know the final format.
2017-08-08 18:56:14 +02:00
Max Kellermann
6e24381962
output/Shout: move code to ShoutSetAudioInfo()
2017-08-08 18:56:12 +02:00
Max Kellermann
3ab905644d
output/Shout: open the encoder first, then open connection
...
This order will be necessary for proper AudioFormat initialization,
because the encoder may change the format.
2017-08-08 18:53:04 +02:00
Max Kellermann
f46d545307
output/Shout: pass shout_t* to shout_connect()
2017-08-08 18:52:03 +02:00
Max Kellermann
8134b0073b
output/Shout: move write_page() into the struct
2017-08-08 18:47:37 +02:00
Max Kellermann
6ab19c7ef2
output/Shout: pass shout_t* to handle_shout_error()
2017-08-08 18:47:30 +02:00
Max Kellermann
d22361f7c7
output/Shout: remove unnecessary nullptr check
2017-08-08 18:47:02 +02:00
Max Kellermann
06c7e55188
output/Filtered: add methods SupportsEnableDisable(), SupportsPause()
2017-08-08 15:54:49 +02:00
Max Kellermann
b3eb8489f3
output/Filtered: add a few OutputPlugin method wrappers
2017-08-08 14:27:19 +02:00
Max Kellermann
5431fca99b
output/Filtered: add attribute "log_name"
2017-08-08 14:02:58 +02:00
Max Kellermann
47c9d6ac64
output/Internal: rename source to Filtered.cxx
2017-08-07 21:50:13 +02:00
Max Kellermann
d0157af13e
filter/Internal: rename struct AudioOutput to FilteredAudioOutput
...
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann
fc04620519
output/Internal: move code to ConfigureConvertFilter()
2017-08-07 18:42:10 +02:00
Max Kellermann
d4ee165253
output/Thread: move OpenSoftwareMixer() to the end
...
This call cannot fail, but needs cleanup if others fail. By moving it
to the end, we eliminate some cleanup.
2017-08-07 18:42:09 +02:00
Max Kellermann
4f7f577a57
output/Internal: add OpenSoftwareMixer()
...
Moved code from AudioOutputControl::InternalOpen2().
2017-08-07 18:33:07 +02:00
Max Kellermann
612def5c11
output/Internal: rename CloseFilter() to CloseSoftwareMixer()
2017-08-07 18:32:43 +02:00
Max Kellermann
704825be96
mixer/Software: include cleanup
2017-08-07 18:31:11 +02:00
Max Kellermann
b8be7ec90e
filter/Normalize: add normalize_filter_prepare()
2017-08-07 18:28:52 +02:00
Max Kellermann
a3d71f4b91
filter/Convert: add convert_filter_prepare()
2017-08-07 18:27:00 +02:00
Max Kellermann
9250819b75
filter/Volume: add volume_filter_prepare()
...
Circumvent filter_new() with a fake ConfigBlock.
2017-08-07 18:23:13 +02:00
Max Kellermann
04738636ca
output/Finish: fold internal function into FinishDestroy()
2017-08-07 18:15:15 +02:00
Max Kellermann
07d1b3780d
output/Control: move two AudioOutput methods to Finish.cxx
2017-08-07 18:13:57 +02:00
Max Kellermann
27d68d8fdd
output/Internal: move the Mutex to struct AudioOutputControl
...
struct AudioOutput should not know or care about multi-threading.
2017-08-07 17:44:46 +02:00
Max Kellermann
546b773b21
output/Internal: remove mutex code from Close()
2017-08-07 17:43:58 +02:00
Max Kellermann
15dcaeda0f
output/Internal: remove mutex code from BeginPause(), IteratePause()
2017-08-07 17:40:40 +02:00
Max Kellermann
8f42ba13ef
output/Internal: simplify "return" statements in IteratePause()
2017-08-07 17:40:13 +02:00
Max Kellermann
5990017d51
output/Internal: remove mutex code from Enable() and Disable()
2017-08-07 17:39:20 +02:00
Max Kellermann
3197c0fd7d
output/Thread: move code to InternalCloseOutput()
2017-08-07 17:35:43 +02:00
Max Kellermann
4580c685f1
output/Thread: unlock the mutex for several AudioOutput calls
2017-08-07 17:08:49 +02:00
Max Kellermann
67232453d4
output/Control: more locking information in API docs
2017-08-07 16:56:41 +02:00
Max Kellermann
b4cce80727
output/Thread: move code to InternalClose()
2017-08-07 16:34:29 +02:00
Max Kellermann
89a2e5ded3
output/Thread: rename InternalClose() to InternalCheckClose()
2017-08-07 16:33:20 +02:00
Max Kellermann
9d6b4f46d4
output/Thread: move AudioOutput methods to Internal.cxx
2017-08-07 16:26:50 +02:00
Max Kellermann
a4019cb6aa
util/StringBuffer: use std::array::const_iterator
2017-08-07 16:18:43 +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
Matthew Leon
573a413ee1
move MusicBrainz id3v2 tags to separate file
...
We will reuse these tags elsewhere.
2017-07-20 08:26:29 +02:00
Max Kellermann
501a4af914
util/StringUtil: move strip functions to StringStrip.cxx
2017-07-05 17:20:02 +02:00
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
b04679b429
util/WritableBuffer: add method MoveFront()
2017-07-05 17:10:59 +02:00
Max Kellermann
19358d1c42
util/Exception: add more utility functions
2017-07-05 17:08:26 +02:00
Max Kellermann
8679074be7
util/Exception: move code to AppendNestedMessage()
2017-07-05 17:07:43 +02:00
Max Kellermann
ba09e22c30
util/Exception: add GetFullMessage(std::exception)
2017-07-05 17:07:41 +02:00
Max Kellermann
6515b9727d
util/Exception: catch std::nested_exception
2017-07-05 17:07:40 +02:00
Max Kellermann
4af8e5bdb5
util/Exception: include cleanup
2017-07-05 17:07:39 +02:00
Max Kellermann
2db8cf477b
util/Exception: add "fallback" and "separator" parameters
2017-07-05 16:59:40 +02:00
Max Kellermann
3cfefa53f7
util/Exception: rename FullMessage() to GetFullMessage()
2017-07-05 12:25:55 +02:00
Max Kellermann
bce89feb13
util/Manual: drop prefix from include guard
2017-07-05 12:25:32 +02:00
Max Kellermann
88f5220acf
util/Manual: drop support for gcc 4.6
2017-07-05 12:25:20 +02:00
Max Kellermann
3e87ac75a1
util/Manual: use C++11 initializer
2017-07-05 12:12:41 +02:00
Max Kellermann
9237f2a80c
util/{Const,Writable}Buffer: add array constructor
2017-07-05 12:09:27 +02:00
Max Kellermann
61aca389c4
util/{Const,Writable}Buffer: add typedef value_type
2017-07-05 12:08:34 +02:00
Max Kellermann
80438c4876
util/BindMethod: add BIND_FUNCTION()
2017-07-05 12:04:29 +02:00
Max Kellermann
70ac4fa96b
util/AllocatedString: implement AllocatedString<wchar_t>::Duplicate()
2017-07-05 10:26:39 +02:00
Max Kellermann
6e2b348758
output/Internal: move the "open" flag to struct AudioOutputControl
2017-06-15 22:52:46 +02:00
Max Kellermann
613dd67784
output/Internal: move the AudioOutputSource to struct AudioOutputControl
2017-06-08 22:13:47 +02:00
Max Kellermann
58683f02ec
output/Thread: move the AudioOutputSource::Open() call to InternalOpen()
...
Prepare for moving the AudioOutputSource to class AudioOutputControl.
2017-06-08 22:08:01 +02:00
Max Kellermann
7cb82fe8f3
output/Thread: move code to InternalClose()
2017-06-08 21:59:48 +02:00
Max Kellermann
0494779ecb
output/Thread: move software_mixer_set_filter() out of the "try" block
...
That function is "noexcept".
2017-06-08 21:49:41 +02:00
Max Kellermann
0500990d23
filter/volume: remove unused PcmVolume instance
2017-06-08 21:48:22 +02:00
Max Kellermann
22a82f1eaa
mixer/software, filter/volume: add "noexcept"
2017-06-08 21:45:23 +02:00
Max Kellermann
13b04dc908
mixer/Internal: add "noexcept"
2017-06-08 21:42:57 +02:00
Max Kellermann
011106b517
mixer/Internal: use C++11 initializers
2017-06-08 21:42:39 +02:00
Max Kellermann
7467b85019
output/Thread: rename audio_format to in_audio_format
2017-06-08 13:20:55 +02:00
Max Kellermann
7dea615f74
output/{Source,Thread}: make the AudioFormat parameter const
2017-06-08 13:19:34 +02:00
Max Kellermann
3010d182fc
output/Internal: move "really_enabled" flag to class AudioOutputControl
2017-06-08 09:55:49 +02:00
Max Kellermann
a72a02f0f2
output/Thread: move Enable() call to InternalEnable()
2017-06-08 09:51:13 +02:00
Max Kellermann
614df96382
output/Thread: move Enable() call out of Open()
2017-06-08 09:50:34 +02:00
Max Kellermann
669d7a6feb
output/Thread: move Close() call out of Disable()
2017-06-08 09:34:24 +02:00
Max Kellermann
d600b937f1
output/Thread: move code to InternalDisable()
2017-06-08 09:32:07 +02:00
Max Kellermann
ae713cb099
*: add lots of "noexcept" specifications
2017-06-04 13:09:11 +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
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
1fa1790da5
output/Internal: move the "pause" flag to struct AudioOutputControl
2017-05-23 11:23:10 +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
a50b2c3b85
output/Thread: rename {Play,Pause}() to Internal{Play,Pause}()
2017-05-23 10:59:17 +02:00
Max Kellermann
ebecee3d85
output/Internal: move "client" to struct AudioOutputControl
2017-05-23 00:32:03 +02:00
Max Kellermann
194f733ca7
output/MultipleOutputs: use LoadOutputControl() in AddNullOutput()
2017-05-23 00:31:31 +02:00
Max Kellermann
3907ddbcc4
output/{Internal,Control}: add "noexcept"
2017-05-23 00:17:23 +02:00
Max Kellermann
e616be0a42
output/Thread: move code to InternalOpen()
2017-05-23 00:08:36 +02:00
Max Kellermann
5eef146871
output/Internal: move several flags to struct AudioOutputControl
2017-05-22 23:40:20 +02:00
Max Kellermann
2e65686fc0
output/Control: add method Configure()
...
Prepare to move some configuration settings from AudioOutput to
AudioOutputControl.
2017-05-22 23:36:45 +02:00
Max Kellermann
e5847f1ddf
output/MultipleOutputs: move code to LoadOutputControl()
2017-05-22 23:35:32 +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
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
cdd2d4cc1d
util/StringView: add method EndsWith()
2017-05-17 12:39:01 +02:00
Max Kellermann
3bcabad28c
net/SocketAddress: add method IsV6Any()
2017-05-17 12:22:59 +02:00
Max Kellermann
c629ac7168
net/SocketAddress: add more "noexcept"
2017-05-17 12:21:36 +02:00
Max Kellermann
0195d5590f
net/AllocatedSocketAddress: allow copying
2017-05-17 12:19:24 +02:00
Max Kellermann
e7bebb0089
net/AllocatedSocketAddress: add more "noexcept"
2017-05-17 12:07:20 +02:00
Max Kellermann
7b05df8d33
net/AllocatedSocketAddress: use C++11 initializers
2017-05-17 12:06:45 +02:00
Max Kellermann
a8db9ae304
net/StaticSocketAddress: add method SetPort()
2017-05-17 12:03:45 +02:00
Max Kellermann
e6e9b2041e
net/AllocatedSocketAddress: add method SetPort()
2017-05-17 09:36:01 +02:00
Max Kellermann
77c747a8fd
net/SocketAddress: add method GetPort()
2017-05-17 09:28:12 +02:00
Max Kellermann
907fb257cd
util/StringAPI: add StringToken(), StringIsEqualIgnoreCase(), StringCollate()
2017-05-16 23:04:27 +02:00
Max Kellermann
60bd60db03
util/String{Compare,API}: add more "noexcept"
2017-05-16 23:02:36 +02:00
Max Kellermann
0fcc28a108
util/String{Compare,API}: indent with tabs
2017-05-16 23:01:43 +02:00
Max Kellermann
ab8005f03e
util/ScopeExit: include cleanup
2017-05-16 22:56:30 +02:00
Max Kellermann
5e8f578e78
util/ConcatString: return the end pointer
2017-05-16 11:56:56 +02:00
Max Kellermann
a4b1633e11
util/ConcatString: use std::copy_n() instead of memcpy()
2017-05-16 11:56:19 +02:00
Max Kellermann
fea211a109
util/Alloc: move template functions to ConcatString.hxx
2017-05-16 11:32:55 +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
86a0a42a8d
util/StringView: add "noexcept"
2017-05-16 10:27:14 +02:00
Max Kellermann
662842126d
util/SplitString: add "noexcept"
2017-05-16 10:23:50 +02:00
Max Kellermann
66e3801b1e
util/MimeType: add "noexcept"
2017-05-16 10:23:38 +02:00
Max Kellermann
a30cf60422
util/FormatString: add "noexcept"
2017-05-16 10:22:52 +02:00
Max Kellermann
c2b8b818c7
util/DivideString: add "noexcept"
2017-05-16 10:22:36 +02:00
Max Kellermann
4284b0e2b8
util/ByteReverse: add "noexcept"
2017-05-16 10:21:59 +02:00
Max Kellermann
9def9b35b9
util/Exception: add "noexcept"
2017-05-16 10:20:17 +02:00
Max Kellermann
377a2860cc
Log: add "noexcept"
2017-05-16 10:15:43 +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
c5996c0593
*: add "noexcept" to many, many function prototypes
...
See commit 71f0ed8b74
2017-05-15 23:05:45 +02:00
Max Kellermann
cde5a07981
*: remove "pure" and "const" attributes from throwing functions
...
See commit 788e3b31e1
for an explanation.
2017-05-15 23:02:10 +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
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
f567083006
Main: refactor DEFAULT_BUFFER_SIZE to represent bytes
2017-05-15 22:40:23 +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
8bb9d0960b
output/Control: add struct AudioOutputControl
...
Will move attributes from struct AudioOutput that are specific to the
OutputThread. The new struct AudioOutputControl is a holder for the
AudioOutput pointer.
This prepares for making the output list more dynamic, to allow moving
outputs to between partitions.
2017-04-28 22:04:24 +02:00
Max Kellermann
59181ac5fb
output/Thread: move code to BeginPause(), IteratePause()
2017-04-28 22:01:20 +02:00
Max Kellermann
2a831fa547
output/Output*: drop "Output" prefix from source file name
2017-04-28 21:42:24 +02:00
Max Kellermann
b0ce551523
decoder/pcm: support audio/L24
...
Closes #31
2017-04-24 20:54:13 +02:00
Max Kellermann
8b0269c264
Merge branch 'v0.20.x'
2017-04-24 20:54:04 +02:00
Max Kellermann
6b60d1e71f
decoder/pcm: add missing nullptr check
...
Fixes a potential crash bug which is actually unreachable, because the
"pcm" plugin is never invoked when there is no (matching) MIME type.
2017-04-24 20:36:55 +02:00
Max Kellermann
d68772d45a
util/{Foreign,Static}FifoBuffer: update API documentation
2017-04-24 20:19:14 +02:00
Max Kellermann
52cb425e33
util/StaticFifoBuffer: add method GetCapacity()
2017-04-24 20:18:44 +02:00
Max Kellermann
ed3220f37f
util/{Foreign,Static}FifoBuffer: use C++11 initializers
2017-04-24 20:16:18 +02:00
Max Kellermann
f6e428ac22
Merge branch 'v0.20.x'
2017-04-24 11:44:27 +02:00
Max Kellermann
45fbafae94
decoder/pcm: split variable "frame_size" in "in_*" and "out_*"
2017-04-24 11:32:52 +02:00
Max Kellermann
803b73a34b
pcm/PcmPack: add pcm_unpack_24be()
2017-04-24 11:32:52 +02:00
Max Kellermann
7b7fb5acd5
decoder/pcm: fix potential assertion failure in FillBuffer()
...
After a seek failure, the buffer may still be full, and then
FillBuffer() aborts with assertion failure.
2017-04-24 11:20:37 +02:00
Max Kellermann
b1512201ab
pcm/PcmPack: remove obsolete code comment
2017-04-22 09:52:10 +02:00
Max Kellermann
424e9cbc43
pcm/PcmPack: simplify unpack_sample()
2017-04-22 09:28:54 +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