Commit Graph

11793 Commits

Author SHA1 Message Date
Max Kellermann 7ec707927d lib/nfs/Blocking, neighbor/smbclient: pass std::chrono::duration to Cond::timed_wait() 2016-12-29 11:37:18 +01:00
Max Kellermann 837134daef system/Clock: remove obsolete MonotonicClock*() functions
We're using std::chrono::steady_clock now.  No need to duplicate code.
2016-12-28 22:24:09 +01:00
Max Kellermann 4011899846 system/PeriodClock: use std::chrono::steady_clock 2016-12-28 22:23:45 +01:00
Max Kellermann 28e743ba70 output/Timer: include cleanup 2016-12-28 22:23:45 +01:00
Max Kellermann a161d404ad lib/xiph/OggSerial: use std::chrono::steady_clock 2016-12-28 22:17:59 +01:00
Max Kellermann cd607cb280 lib/upnp/Discovery: use std::chrono::steady_clock 2016-12-28 22:06:06 +01:00
Max Kellermann 4e60ab7f53 lib/upnp/Discovery: use C++11 initializers 2016-12-28 22:05:31 +01:00
Max Kellermann 71e7d32b08 output/Timer: use std::chrono 2016-12-28 22:00:33 +01:00
Max Kellermann d5e422970c output/Plugin: delay() returns std::chrono::steady_clock::duration 2016-12-28 22:00:29 +01:00
Max Kellermann 871ba5a488 thread/Cond: add timed_wait() overload with std::chrono support 2016-12-28 21:47:04 +01:00
Max Kellermann 249e8d59cb Stats: use std::chrono 2016-12-28 10:22:55 +01:00
Max Kellermann 8f4769d2ac Stats: initialize start_time automatically 2016-12-28 10:22:15 +01:00
Max Kellermann a3ca9963a5 output/Timer: pass size_t to Add() 2016-12-28 10:17:29 +01:00
Max Kellermann 2d3c23876c output/Timer: use C++11 initializers 2016-12-28 10:16:41 +01:00
Max Kellermann bd8d8eef3e output/Timer: no "time" initialization if !started 2016-12-28 10:16:11 +01:00
Max Kellermann e786207cc2 system/PeriodClock: indent with tabs 2016-12-28 01:18:42 +01:00
Max Kellermann b042095ac2 event/Loop: use std::chrono 2016-12-28 01:15:08 +01:00
Max Kellermann 3413d1bf23 config/Global: add std::chrono::steady_clock::duration overload 2016-12-28 01:12:38 +01:00
Max Kellermann 018c5ef731 event/Loop: use C++11 initializers 2016-12-27 23:13:26 +01:00
Max Kellermann fdb136f1fa StateFile: use C++11 initializers 2016-12-27 23:13:26 +01:00
Max Kellermann 9e33074735 output/Thread: move software_mixer_set_filter() call to Open()
.. and remove the obsolete method OpenFilter().
2016-12-27 14:44:39 +01:00
Max Kellermann d6d465cdf4 output/Thread: fix assertion failure in CLOSE handler
Convert assertion to runtime check; this assertion could fail when the
output was closed due to an error before CLOSE arrived.
2016-12-27 07:57:22 +01:00
Max Kellermann e76573cc1a output/Thread: use "true" instead of "1" 2016-12-27 07:53:02 +01:00
Max Kellermann 3fa6dc71e2 output/Source: add assertion 2016-12-26 20:10:00 +01:00
Max Kellermann 6fec269844 output/SharedPipeConsumer: add thread-safety documentation 2016-12-26 20:09:10 +01:00
Max Kellermann b6004b6837 output/Source: release the mutex while the filter runs
The filter can take some time to finish, even more so on a weak
machine with a saturated CPU.  By not holding the mutex during that
time, we can reduce PlayerThread latency a lot, because that thread
needs to synchronize a lot with all outputs.
2016-12-26 20:02:15 +01:00
Max Kellermann 86d3b25aec output/Source: add Fill(), ReadTag(), PeekData(), ConsumeData()
Don't expose MusicChunk instances, provide higher-level access to
chunk contents.
2016-12-26 13:53:22 +01:00
Max Kellermann 8a407bfbb0 output/Thread: move code to new class AudioOutputSource 2016-12-26 13:35:19 +01:00
Max Kellermann d30a590d9e configure.ac: use MPD_AUTO for libsndio and Haiku 2016-12-26 13:35:19 +01:00
Max Kellermann f95e404be1 outputThread: optimize Command::OPEN
Try harder to skip steps (reopen filter, reopen output) if the
AudioOutput is already open.
2016-12-24 14:05:11 +01:00
Max Kellermann ffb8b4fc68 output/Internal: add method ClearTailChunk() 2016-12-22 14:46:59 +01:00
Max Kellermann f86d6b0162 output/Control: move pipe initialization to the OutputThread
Un-protect the SharedPipeConsumer instance, and make it available in
the OutputThread only.  This gives more well-defined mutex protection.
2016-12-22 14:04:38 +01:00
Max Kellermann 71c72ed072 output/Control: use Command::OPEN to unpause, remove special case 2016-12-22 14:04:38 +01:00
Max Kellermann a8d343e07b output/Thread: update in_audio_format before ReopenFilter() 2016-12-22 14:04:34 +01:00
Max Kellermann d020172181 output/Thread: keep the device open if the audio format hasn't changed
Add another condition to Reopen() which allows keeping it open.
2016-12-21 17:45:01 +01:00
Max Kellermann e5c9f6c1fe output/Internal: add attribute request.audio_format
Make in_audio_format accessible only from within the OutputThread, and
add a new one for inter-thread communication.
2016-12-21 17:00:29 +01:00
Max Kellermann 176dc11748 output/Thread: ao_filter_chunk() throws exception on error
Move the error logging to AudioOutput::PlayChunk().
2016-12-20 17:40:11 +01:00
Max Kellermann c2abd02b9b output/Thread: use ConstBuffer::skip_front() 2016-12-20 17:38:08 +01:00
Max Kellermann 12ecfdd423 output/Thread: convert pointer to reference 2016-12-20 17:35:38 +01:00
Max Kellermann 67cfbfc2f3 output/SharedPipeConsumer: update API documentation 2016-12-20 16:35:14 +01:00
Max Kellermann fc83d38e67 input/curl: wrap CURLM* in new class CurlMulti 2016-12-19 16:41:12 +01:00
Max Kellermann 7063c423eb input/curl: rename class CurlMulti to CurlGlobal 2016-12-19 16:37:01 +01:00
Max Kellermann 36b93993cf input/curl: wrap CURL* in new class CurlEasy 2016-12-19 14:42:04 +01:00
Max Kellermann ceffc5aa72 input/curl: remove duplicate InitEasy() call 2016-12-19 14:38:50 +01:00
Max Kellermann ccb45b6f6e output/Client: new interface to replace direct access to class PlayerControl 2016-12-14 20:29:15 +01:00
Max Kellermann d2e47e014a player/Thread: reduce unlock/lock overhead in PlayerCommand::PAUSE handler 2016-12-14 20:24:52 +01:00
Max Kellermann a5b8d7917f player/Thread: mutex must be locked inside OpenOutput() 2016-12-14 20:23:23 +01:00
Max Kellermann d0e735ee4b player/Thread: mutex must be locked inside CheckDecoderStartup() 2016-12-14 20:13:18 +01:00
Max Kellermann ece5971027 output/Multiple: move Wait() to struct PlayerControl
Eliminate a dependency from MultipleOutputs on PlayerControl.
2016-12-14 19:37:01 +01:00
Max Kellermann 7c6b0d5c31 player/Thread: use class ScopeLock 2016-12-14 13:10:48 +01:00