Commit Graph

885 Commits

Author SHA1 Message Date
Max Kellermann 9d47b220a4 lib/curl: add "noexcept" 2017-11-12 17:49:58 +01:00
Max Kellermann cf483107c9 event/IdleMonitor: add "noexcept" 2017-11-12 17:40:25 +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 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 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 49784513b1 util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL 2017-11-10 19:24:33 +01: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 2a6d5583d1 lib/alsa: add "noexcept" 2017-10-26 08:24:14 +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 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 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 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 9744f437d8 Util/CharUtil: add wchar_t overloads
Needed for WStringView.
2017-09-12 18:22:02 +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 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 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 95637fd153 lib/upnp/Discovery: use strncmp() instead of memcmp()
memcmp() can overflow the buffer.
2017-08-18 18:48:22 +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 492b20a89d event/SocketMonitor: use class SocketDescriptor 2017-08-10 19:19:58 +02:00
Max Kellermann 4e113a7086 lib/nfs/Connection: use class SocketDescriptor 2017-08-10 17:37:19 +02:00
Max Kellermann 501a4af914 util/StringUtil: move strip functions to StringStrip.cxx 2017-07-05 17:20:02 +02:00
Max Kellermann 979f1b6c39 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 c5996c0593 *: add "noexcept" to many, many function prototypes
See commit 71f0ed8b74
2017-05-15 23:05:45 +02:00
Max Kellermann 4faef28cc5 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 b4e4bdcda9 lib/alsa/Version: wrapper for snd_asoundlib_version() 2017-03-29 20:33:06 +02:00
Max Kellermann e26d49efb7 Merge tag 'v0.20.6'
release v0.20.6
2017-03-10 17:02:32 +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 190d525099 lib/curl/Request: move code to IsResponseBoundaryHeader() 2017-03-10 16:24:30 +01:00