Commit Graph

12225 Commits

Author SHA1 Message Date
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
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
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
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
Max Kellermann
af033c0d1d NEWS: mention the GME decoder change 2017-09-22 20:00:12 +02: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