Commit Graph

915 Commits

Author SHA1 Message Date
Max Kellermann c582a9faae event/MultiSocketMonitor: add "noexcept" 2017-11-12 17:42:50 +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 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
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 6e7f866288 input/alsa: migrate from DeferredMonitor to DeferEvent 2017-09-21 22:58:00 +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 9f827c99cb input/async: use class HugeArray instead of HugeAllocation 2017-09-21 21:50:45 +02:00
Max Kellermann b46835e15e util/HugeAllocator: HugeAllocator() returns WritableBuffer<void> 2017-09-21 21:47:49 +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 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 b7d0890bc0 lib/curl/Init: share a CurlGlobal instance between input and storage 2017-08-18 13:34:55 +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 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 4faef28cc5 Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +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 ff32b0dc9b input/curl: use %lu instead of %llu
Fixes a GCC warning because %llu appears to be unsupported by the
Windows standard library.
2017-03-01 16:44:11 +01:00
Max Kellermann c1869a11af input/curl: format Range offset as unsigned 2017-03-01 16:44:08 +01:00
Max Kellermann ca559b1db6 input/curl: use %lu instead of %llu
Fixes a GCC warning because %llu appears to be unsupported by the
Windows standard library.
2017-02-21 12:06:56 +01:00
Max Kellermann a8e76fb345 input/curl: format Range offset as unsigned 2017-02-21 12:06:03 +01:00
Max Kellermann 7e46277016 Merge branch 'v0.20.x' 2017-02-19 19:46:18 +01:00
Max Kellermann 781487c4dd thread/Thread: use BoundMethod 2017-02-10 22:46:09 +01:00
Max Kellermann 87c9856b20 input/alsa: use the EventLoop& passed to init() instead of io_thread_get() 2017-02-10 22:24:44 +01:00
Max Kellermann 20ae84bff9 {input,mixer}/alsa: cancel the DeferredMonitor in the destructor
Yet another potential crash bug fix.
2017-02-10 15:05:49 +01:00
Max Kellermann 9e503b21c1 {input,mixer}/alsa: move code to lib/alsa/NonBlock.cxx 2017-02-09 21:24:24 +01:00
Max Kellermann 67a958a326 Merge branch 'v0.20.x' 2017-02-09 21:24:20 +01:00
Max Kellermann eda06993f8 event/MultiSocketMonitor: add method Reset() 2017-02-09 21:12:23 +01:00
Max Kellermann 76a1cae5d8 {input,mixer}/alsa: fix off-by-one bug in count check
Doesn't make a practical difference - but it's more correct this way.
2017-02-09 12:46:49 +01:00
Max Kellermann 03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann 3854211694 input/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
2017-01-26 09:26:25 +01:00
Max Kellermann 58ac72f79d input/nfs: use NfsFileReader::GetEventLoop() 2017-01-26 09:25:56 +01:00
Max Kellermann 6d5904801e lib/nfs/FileReader: use nfs_get_event_loop()
Make sure we're using the same EventLoop as the NfsManager.
2017-01-26 09:23:49 +01:00
Max Kellermann 7af8e3937f lib/nfs/FileReader: use C++11 initializers 2017-01-26 09:21:57 +01:00
Max Kellermann f8eeded528 input/async: pass EventLoop& to constructor 2017-01-25 23:18:33 +01:00
Max Kellermann c3fa7e13cf input/Plugin: include cleanup 2017-01-25 23:18:17 +01:00
Max Kellermann 5c18b0a94d input/curl: use CurlGlobal::GetEventLoop() 2017-01-25 23:16:56 +01:00
Max Kellermann ecbad638f1 input/async: add method GetEventLoop() 2017-01-25 23:15:52 +01:00
Max Kellermann 611ce6e756 lib/nfs/{FileReader,Glue}: pass EventLoop&
Eliminate dependency on io_thread_get().
2017-01-25 23:02:02 +01:00
Max Kellermann 68bb738af2 input/alsa: use snd_pcm_?w_params_alloca() 2017-01-25 08:47:20 +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 d1f3a87c08 input/alsa: remove the start_threshold setting
This setting is mostly useless for capture devices.  There's no point
in configuring it.
2017-01-14 21:47:37 +01:00
Max Kellermann 9f8145e590 input/alsa: dump buffer/period sizes 2017-01-14 21:09:57 +01:00