Commit Graph

14489 Commits

Author SHA1 Message Date
Max Kellermann
06a0a4a838 time/Convert: include sys/time.h for struct timeval
Closes https://github.com/MusicPlayerDaemon/MPD/issues/562
2019-05-21 10:13:16 +02:00
Max Kellermann
8942be858b release v0.21.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlziw4IQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEqrmD/4ipjXE5PkGD7unTIvnmv0X1FRnaOO1rwyY
 SkqWl2D8DsgFh1d0IkNxzofNQ5mv3YpZY2ycD4kHbM+RWkV+fVuGnhePSCSd0w2s
 Lj5r8yYq43UfIwn4fVwFeqjsEhtT47gHLATJ4/Zc4q+VfzVhPqp1esxrf+vHX6nH
 SCMp9WP5L8FBcf28IqW3hBc/cOTtp36FsuzRkyFMrM/tq6a6VF8mqBKO9Qpnz6OU
 egq3d+tqpg1Qq90QXZx7LfXArK0v89Wezv3M/EhzamBc2DClFQnaL3BTOD0hawdt
 WRfm8WzdXS73QrmJvcOFtcath6jdrKIvBwMKIdmDikp2ofF0m1COh9UcHReA0MK9
 UbRZWmeTzeu+UKNugD//Ma+oNwntv5W/xSSvEsgvLTiyd8XcdlKXcsrwbYVD7o3L
 uTKq8V2h5iDC5cure5FvWnpaugaI38fJ+DDGArSe/BhScQhioXAPFa3hSGLux3e8
 gaKWu6/6biCi8yMra8z4dL2zyUNLEw4J2e9RPweLeQL/gi0A1alSLtcQ6VWGGFFW
 5GtQALTuISH5/9TWnr1LGiI6cgNHCQ2JOeL99pChu+PdoSiuA+KwQojZ4UEUVAGL
 GTbupl3yUFJ9jv/rLZOjOIycJ9cYifM+Th98iTfK4aMQujzAkJj132Qqzci+rUXp
 6R9hfalT2A==
 =aixT
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.9'

release v0.21.9
2019-05-20 17:23:01 +02:00
Max Kellermann
66a8fac25e release v0.21.9 2019-05-20 17:10:58 +02:00
Max Kellermann
1b902e00b4 doc/protocol.rst: several clarifications
Closes https://github.com/MusicPlayerDaemon/MPD/issues/340
2019-05-20 17:06:20 +02:00
Max Kellermann
45a091c00c .github: add issue templates 2019-05-20 16:44:02 +02:00
Max Kellermann
923e66738c player/Thread: fix "single" mode race condition
If the decoder finishes decoding the current song between the two
IsIdle() checks, MPD stops playback instead of starting the decoder
for the next song.

This is usually not visible problem, because the main thread restarts
it via playlist::ResumePlayback(), but that way it, ignores "single"
mode.

As a workaround, this commit adds another "queued" check which
re-enters the player loop and checks again whether to start the
decoder.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/556
2019-05-20 16:22:01 +02:00
Max Kellermann
ff3e2c0514 player/Thread: remove unnecessary "pipe" check
The "queued" flag can only possibly be set if the decoder is still
decoding the current song or if the decoder is stopped.  This is also
what the following assert() checks.  This check was not necessary.
2019-05-20 16:20:59 +02:00
Max Kellermann
6922a2f55e input/buffered: check error in IsAvailable() 2019-05-17 12:43:45 +02:00
Max Kellermann
219546cb81 input/buffering: check error in IsAvailable() 2019-05-17 12:43:06 +02:00
Max Kellermann
555a4d738c input/buffering: pass offset to Read() and eliminate Seek()
Another step towards supporting multiple readers.
2019-05-17 12:02:55 +02:00
Max Kellermann
813567bf5c input/buffering: use notify_one() to wake up thread
There is just one thread.
2019-05-17 11:57:23 +02:00
Max Kellermann
16a07bc201 input/buffering: remove obsolete thread wakeup
The thread will always attempt to read more data since commit
2cf6b77627, so we don't need to tell it
to continue.
2019-05-17 11:56:30 +02:00
Max Kellermann
1153715608 input/buffering: rename "read_error" to "error"
The "seek_error" attribute will be eliminated soon.
2019-05-17 11:29:19 +02:00
Max Kellermann
b5c7c16fb4 input/buffering: merge multiple exception handlers into RunThread() 2019-05-17 11:23:54 +02:00
Max Kellermann
302c0515b7 input/buffering: move code to RunThreadLocked() 2019-05-17 11:21:56 +02:00
Max Kellermann
19e4672a54 input/buffering: use notify_all() instead of notify_one()
More preparations to support multiple readers.
2019-05-17 11:17:16 +02:00
Max Kellermann
c2dd6808e1 input/buffering: make read errors fatal, no recovery
If a read error occurs, it is very unlikely that the InputStream will
ever recover.  Removing the code removes some code complexity which
just isn't worth it.  And it allows supporting multiple readers for
one buffer.
2019-05-17 10:55:58 +02:00
Max Kellermann
2cf6b77627 input/buffering: eliminate "idle" flag, automatically seek to next hole 2019-05-16 22:42:29 +02:00
Max Kellermann
a5c09f4ddb input/buffering: destruct our input while mutex is unlocked 2019-05-16 22:38:37 +02:00
Max Kellermann
1acb9bcedb input/buffering: close input if buffered completely 2019-05-16 22:34:11 +02:00
Max Kellermann
0626e3d21e input/buffering: at end of input, seek to first hole 2019-05-16 22:29:10 +02:00
Max Kellermann
869d215058 input/buffering: merge "read_error" and "idle" checks in thread 2019-05-16 22:25:21 +02:00
Max Kellermann
0cf922b2da input/buffering: clear read_error after successful seek
After seeking, a new read should be done.
2019-05-16 22:24:57 +02:00
Max Kellermann
5e266cd8e4 Merge branch 'v0.21.x' 2019-05-16 22:12:48 +02:00
Max Kellermann
ca5a400dbe input/buffered: rethrow read_error in Check() 2019-05-16 22:08:33 +02:00
Max Kellermann
63fe4d1d17 input/buffered: wake up client thread on seek error 2019-05-16 22:05:25 +02:00
Max Kellermann
a199f58db5 input/buffering: update thread name 2019-05-16 22:02:51 +02:00
Max Kellermann
5277297336 input/buffered: move basic buffering code to class BufferingInputStream
Prepare to reuse it in another class.
2019-05-16 21:41:28 +02:00
Max Kellermann
604d08b2c6 Merge branch 'v0.21.x' 2019-05-16 21:26:45 +02:00
Max Kellermann
ca06d9d3bf input/buffered: fix deadlock bug 2019-05-16 21:11:03 +02:00
Max Kellermann
ed2db04f43 doc/mpd.conf.5: remove ALSA specific documentation
ALSA is just one out of many output plugins, and detailed plugin
documentation should only live in the user manual, without having
duplicates in the (brief) manpage.

Also move "mixer_type" to the "optional audio output parameters"
section; it is a generic option, not specific to ALSA.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/552
2019-05-13 22:51:48 +02:00
Max Kellermann
de0afa0e08 doc/mpd.conf.5: fix section indent 2019-05-13 22:51:45 +02:00
Max Kellermann
f0d3227d7b doc/protocol.rst: add references to audio_output_format 2019-05-13 22:46:23 +02:00
Max Kellermann
fb07a7cecc doc/user.rst: move audio format spec to section "Global Audio Format" 2019-05-13 22:39:49 +02:00
Max Kellermann
c6b08a4d48 doc/user.rst: add reference to audio_output_format 2019-05-13 22:39:44 +02:00
Max Kellermann
040e87ad8d doc/user.rst: more markup 2019-05-13 22:36:19 +02:00
Max Kellermann
d5521ead56 doc/user.rst: add missing space 2019-05-13 22:36:19 +02:00
Max Kellermann
a48604d2e3 util/SparseBuffer: remove bogus noexcept from constructor
The HugeArray constructor can throw std::bad_alloc, and so can
SparseBuffer's constructor.
2019-05-08 22:34:33 +02:00
Max Kellermann
98e6a861ca util/HugeAllocator: import std::swap() 2019-05-08 22:33:41 +02:00
Max Kellermann
2c6dd04d19 util/HugeAllocator: add noexcept 2019-05-08 22:32:50 +02:00
Max Kellermann
82ca3aa281 time/ISO8601: forward-declare StringBuffer 2019-05-08 16:24:31 +02:00
Max Kellermann
b45f5c7bf6 time/Convert: update copyright 2019-05-08 16:23:58 +02:00
Max Kellermann
f54877d128 time/Convert: mention exceptions 2019-05-08 16:14:12 +02:00
Max Kellermann
af3ea97a42 zeroconf/AvahiPoll: move TimevalToChrono() to time/Convert.cxx 2019-05-08 16:11:14 +02:00
Max Kellermann
8beac03dc4 time/Convert: add noexcept 2019-05-08 16:09:27 +02:00
Max Kellermann
4a49a5587d time/Convert: add pure attributes 2019-05-08 16:08:54 +02:00
Max Kellermann
d0cfa44c8f time/FileTime: use ToUint64() in DeltaFileTimeS() 2019-05-08 16:06:19 +02:00
Max Kellermann
5bae6946c6 time/FileTime: add ToUint64(FILETIME) 2019-05-08 16:05:37 +02:00
Max Kellermann
a8fc805594 time/FileTime: drop static 2019-05-08 16:05:21 +02:00
Max Kellermann
a265738528 time/FileTime: add noexcept 2019-05-08 16:04:07 +02:00