Max Kellermann
cdf92c6300
util/StringView: remove redundant template parameters
2017-09-12 16:57:19 +02:00
Max Kellermann
be5b726c0a
util/StringView: remove Literal()
...
This is not necessary, because a strlen() on a literal gets optimized
away by the compiler.
2017-09-12 16:55:10 +02:00
Max Kellermann
3491218915
db/update/Service: use C++11 initializers
2017-09-09 07:59:51 +02:00
Max Kellermann
d0f6131ba4
output/Interface: allow Pause() to throw exception
...
Coverity discovered that the Pulse plugin could throw exceptions from
Pause(), but that method was marked "noexcept" because its caller was
not designed to catch exceptions. So instead of avoiding exceptions
(by catching and logging them in each and every implementation), let's
allow them, and do the catch/log game in the MPD core.
2017-09-08 14:45:53 +02:00
Max Kellermann
9cc37bdea2
command/PlayerCommands: emit "volume" only if it is known
...
The "-1" magic value is deprecated now.
2017-09-04 08:37:37 +02:00
Max Kellermann
3f754fd350
Merge branch 'v0.20.x'
2017-09-04 08:27:08 +02:00
Max Kellermann
f4f461b8bb
storage/curl: support Content-Type application/xml
2017-09-01 11:32:40 +02:00
Max Kellermann
cbb9b6957f
storage/curl: use StringStartsWith()
2017-09-01 11:31:10 +02:00
Max Kellermann
f6b56c9317
storage/curl: move code to IsXmlContentType()
2017-09-01 11:30:30 +02:00
Max Kellermann
91438b6540
output/Interface: the default Pause() implementation fails
...
Fixes regression from commit 31bad5f7af
:
if Pause() returns true, the output thread is running a busy loop,
causing 100% CPU usage, instead of just closing the output.
Closes #105
2017-08-31 15:02:15 +02:00
Max Kellermann
987c505906
event/TimeoutMonitor: remove obsolete class
2017-08-29 16:53:15 +02:00
Max Kellermann
598bb93cc2
StateFile: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:52:02 +02:00
Max Kellermann
dc531b64ae
db/update/InotifyQueue: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:38:50 +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
2e471daef1
storage/nfs: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:30:50 +02:00
Max Kellermann
7ae57a3531
event/MultiSocketMonitor: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
11f36c0bd6
zeroconf/AvahiPoll: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
fd520eeed2
Client: migrate from TimeoutMonitor to TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
30a5dd267b
event/TimeoutMonitor: move code to new class TimerEvent
2017-08-29 16:28:27 +02:00
Max Kellermann
2f0d683378
event/Loop: fix inverted checkin RemoveDeferred()
2017-08-29 16:28:24 +02:00
Max Kellermann
a1309a90ac
event/Loop: use boost::intrusive::list to store IdleMonitors and DeferredMonitors
...
The intrusive contains can easily erase items without searching
through the whole list. This removes a good amount of runtime
overhead.
2017-08-29 15:43:16 +02:00
Max Kellermann
010855a294
event/Loop: use boost::intrusive::multiset to store TimeoutMonitors
...
By using an "intrusive" data structure, we can easily eliminate
struct TimerRecord.
2017-08-29 14:42:59 +02:00
Max Kellermann
71ed3ff992
event/Loop: move TimerRecord::due to class TimeoutMonitor
...
Prepare to eliminate the TimerRecord struct.
2017-08-29 14:13:09 +02:00
Max Kellermann
d4266d0063
event/Loop: remove unused method TimerRecord::IsDue()
2017-08-29 13:41:11 +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
732f6aaa30
neighbor/Explorer: add "noexcept"
2017-08-25 10:09:34 +02:00
Max Kellermann
dd422c7b8b
neighbor/plugins/*: remove redundant "virtual"
2017-08-25 10:07:32 +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
28a2d41b85
db/DatabasePlugin: pass EventThread's EventLoop to create()
...
Allows database plugins to use the EventThread, e.g. for CURL
integration.
2017-08-24 19:53:52 +02:00
Max Kellermann
7e76656a18
db/DatabasePlugin: add #EventLoop parameter documentation
2017-08-24 19:45:23 +02:00
Max Kellermann
0b93f52ba4
release v0.20.10
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlmefSAQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEut8D/4oZgzdHTMbR6uYbFvkUmPrwtohq8N4JbaS
/TtESfKPJ5PIv42MA5k89DjssQUz0uzuladsy+WXxTx8BD4naXaiOy7loDXjPcnu
YL0sUdAKZVVBdau4dcumSQF0ewhUjuKZUt2I6W2Q35IpagV89nf+mHUXDtUrjykC
coXIwrcINpi0MSo1pbS5m11XNOk2yPfl8ZR+9yn6AvaseCtrwxmogAJGK5bUSKUM
NMaLffVLNfIL/YEBzm2RdgSyU4LBREKnO6vF7UCBSKHIVPyne83fbqc90COj7I9Q
01LGowUAvJIoRIlMzjxlXO6S13hmXJlDZSECaaQYQjiC70RbC1+sK9tQtKQ4BqET
C+vG9ysfqVi4bsYkOppR5JDE9NcghkjK+iGwBYVdXmRwGzmdb1W6fWgAqYGRF+Ql
Fg+/htruNsvvuO+RtcOd8WJWpP3nKisGu9jRp7dceAsWGE20M8HTjCeSZsZM+LvU
B9Lp9NplKqkJyq2k81OUmGBWkR7t8okMeZGvon+sExZ285giryOfhao4eEX7CBqy
XHlClydNnBW11R6TEzhjIxCDufPdboM0XHVxX4kutfkPVGkPnJR/8Jk0c+d7AiVE
H5MSgWsOu9fN//nIuUxdODtL5VMw45/hdydZ9YMI/RnwMQFdEqAZmBvMKE7ZLqrI
F80eZ8/nQg==
=b8hp
-----END PGP SIGNATURE-----
Merge tag 'v0.20.10'
release v0.20.10
2017-08-24 09:35:34 +02:00
Max Kellermann
a00d412008
player/Thread: initialize play_audio_format, fixes assertion
...
This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
2017-08-23 17:43:49 +02:00
Matthew Leon
aa9c6062b0
Merge branch 'v0.20.x' into master
...
contains OSX mixer
2017-08-22 10:36:37 +01:00
Matthew Leon
5fb39658f1
OSX mixer
2017-08-21 20:05:50 +01: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
5ac72211cd
event/Loop: set thread to current thread by default
...
Allows eliminating lots of complexity and workarounds for bogus
assertion failures.
2017-08-18 18:18:55 +02:00
Max Kellermann
94525d3952
IOThread: remove obsolete library
...
We now pass the EventThread's EventLoop reference around.
2017-08-18 18:15:19 +02:00
Max Kellermann
7f9a2f8adb
event/Loop: schedule and cancel the WakeFD in Run()
...
This is only needed while Run() is alive, and moving it there avoids
problems with thread-checking assertions.
2017-08-18 18:08:06 +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
b2b079a26b
SongFilter: use std::chrono::system_clock::time_point instead of time_t
2017-08-18 12:30:50 +02:00
Max Kellermann
b886dfae4d
DetachedSong, db/LightSong, db/simple/Song: use std::chrono::system_clock::time_point
2017-08-18 12:22:47 +02:00
Max Kellermann
902fbb3347
db/LightDirectory: use std::chrono::system_clock::time_point
2017-08-18 12:16:43 +02:00
Ryan Walklin
9f16c798d0
Fix std::string read after free in read_stream_art
2017-08-17 21:25:03 +10:00
Ryan Walklin
318f80d113
Fix EventPipe file descriptors
2017-08-17 12:21:01 +10:00
Ryan Walklin
9df8b32f10
Add albumart command
...
Add API documentation
Support 64 bit offsets
Use InputStream for all reads
2017-08-15 20:38:33 +10:00
Max Kellermann
6f37f5752b
db/PlaylistInfo: use std::chrono::system_clock::time_point
2017-08-11 12:50:33 +02:00
Max Kellermann
9d0a71f245
output/Jack: add "noexcept"
2017-08-11 12:41:11 +02:00
Max Kellermann
ff1b435232
output/Jack: reorder methods
2017-08-11 12:39:42 +02:00
Max Kellermann
b57a272f67
system/EPollFD: throw exception instead of raising fatal error
2017-08-11 09:39:47 +02:00
Max Kellermann
ef79647e85
zeroconf/Avahi: throw exception instead of raising fatal error
2017-08-11 09:38:08 +02:00
Max Kellermann
d3fd89552f
unix/Signalhandlers: throw exception instead of raising fatal error
2017-08-11 09:37:30 +02:00
Max Kellermann
6d43e70a93
event/SignalMonitor: throw exception instead of raising fatal error
2017-08-11 09:36:22 +02:00
Max Kellermann
e8333316ee
Permission: throw exception instead of raising fatal error
2017-08-11 09:33:59 +02:00
Max Kellermann
85edcb858d
tag/Config: throw exception instead of raising fatal error
2017-08-11 09:33:07 +02:00
Max Kellermann
bab5f1a93f
client: make GREETING constexpr
2017-08-11 09:22:26 +02:00
Max Kellermann
6de8303df8
client: use C++11 initializers
2017-08-11 09:21:29 +02:00
Max Kellermann
33b4114534
system/fd_util: remove unused library
2017-08-11 09:20:15 +02:00
Max Kellermann
7a4457402f
system/EventPipe: use FileDescriptor::CreatePipeNonBlock()
2017-08-11 09:19:00 +02:00
Max Kellermann
9056dcaf7d
system/FileDescriptor: add method CreatePipeNonBlock()
2017-08-11 09:15:22 +02:00
Max Kellermann
2119e4fd3e
system/EventPipe: use class UniqueSocketDescriptor in PoorSocketPair()
2017-08-11 09:09:04 +02:00
Max Kellermann
bcd5190f1d
system/EventPipe: throw exception instead of raising fatal error
2017-08-11 09:09:04 +02:00
Max Kellermann
d705a92e43
net/IPv4Address: new class
2017-08-11 09:09:04 +02:00
Max Kellermann
614b3634d4
net/SocketDescriptor: add AcceptNonBlock() overload without address
2017-08-11 09:07:35 +02:00
Max Kellermann
b234f4307f
net/SocketDescriptor: AcceptNonBlock() enables non-blocking even if SOCK_NONBLOCK is unavailable
2017-08-11 09:04:38 +02:00
Max Kellermann
e38c213ee0
net/SocketDescriptor: check HAVE_ACCEPT4
2017-08-11 09:04:10 +02:00
Max Kellermann
699f41e114
system/EventPipe: use AtScopeExit() in PoorSocketPair()
2017-08-11 08:30:37 +02:00
Max Kellermann
424e1363ed
zeroconf/Bonjour: pass SocketDescriptor to constructor
...
Fixes Mac build failure.
2017-08-11 08:25:26 +02:00
Max Kellermann
7484bc31b4
system/FileDescriptor: implement CreatePipe() on Windows
2017-08-11 08:15:47 +02:00
Max Kellermann
5a495cc165
system/fd_util: remove unused function close_socket()
2017-08-10 19:47:57 +02:00
Max Kellermann
9ff4717738
system/fd_util: remove unused function accept_cloexec_nonblock()
2017-08-10 19:47:40 +02:00
Max Kellermann
0c1740982d
system/fd_util: remove unused function open_cloexec()
2017-08-10 19:46:23 +02:00
Max Kellermann
3c7c0515d8
output/oss: use class FileDescriptor
2017-08-10 19:42:23 +02:00
Max Kellermann
56cb92fdaf
mixer/oss: use class FileDescriptor
2017-08-10 19:41:22 +02:00
Max Kellermann
c00b6ff999
fs/FileSystem: use UniqueFileDescriptor in TruncateFile()
2017-08-10 19:40:47 +02:00
Max Kellermann
df5cc3f0f6
fs/FileSystem: OpenFile() returns UniqueFileDescriptor
2017-08-10 19:34:52 +02:00
Max Kellermann
eb0ff32efb
system/FileDescriptor: add Open() overload with wchar_t path
2017-08-10 19:34:52 +02:00
Max Kellermann
cf0120e8e0
net/SocketUtil: use SocketDescriptor::SetBoolOption()
2017-08-10 19:30:46 +02:00
Max Kellermann
1f47dc990d
net/SocketDescriptor: add method SetKeepAlive()
2017-08-10 19:25:02 +02:00
Max Kellermann
9a5bcc6db0
net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept()
2017-08-10 19:20:14 +02:00
Max Kellermann
492b20a89d
event/SocketMonitor: use class SocketDescriptor
2017-08-10 19:19:58 +02:00
Max Kellermann
fcfc8bacc0
output/httpd: remove obsolete accept() error check
2017-08-10 19:19:53 +02:00
Max Kellermann
0800d9427c
system/fd_util: remove unused function socket_cloexec_nonblock()
2017-08-10 17:40:14 +02:00
Max Kellermann
4e113a7086
lib/nfs/Connection: use class SocketDescriptor
2017-08-10 17:37:19 +02:00
Max Kellermann
39f422ded8
net/SocketDescriptor: allow constructing with "int"
2017-08-10 17:37:08 +02:00
Max Kellermann
d2cdaa041c
net/SocketDescriptor: SO_REUSEADDR is portable
2017-08-10 13:23:14 +02:00
Max Kellermann
d84dae488e
net/SocketUtil: fix -Wunused
2017-08-10 13:22:00 +02:00
Max Kellermann
79e75bfbb9
net/SocketDescriptor: cast setsockopt() value to "const char *" for Windows
2017-08-10 13:21:24 +02:00
Max Kellermann
73b15c1bee
net/SocketDescriptor: socketpair() is unavailable on Windows
2017-08-10 13:19:47 +02:00
Max Kellermann
b180604422
net/SocketDescriptor: implement SetNonBlocking() on Windows
2017-08-10 13:18:23 +02:00
Max Kellermann
fab12ef241
net/SocketDescriptor: call SetNonBlocking() on Linux if SOCK_NONBLOCK unavailable
2017-08-10 13:16:25 +02:00
Max Kellermann
917881aa48
net/SocketDescriptors: IsValid() is not available on Windows
2017-08-10 13:15:57 +02:00
Max Kellermann
9259e989a4
net/SocketDescriptors: fix includes for Windows
2017-08-10 13:13:19 +02:00
Max Kellermann
da90f484aa
net/SocketUtil: socket_bind_listen() returns UniqueSocketDescriptor
2017-08-10 13:12:13 +02:00
Max Kellermann
817e912025
net/SocketDescriptor: specialization of FileDescriptor for network sockets
2017-08-10 13:12:13 +02:00
Max Kellermann
7f83d38bca
net/StaticSocketAddress: add struct sockaddr cast operators
2017-08-10 13:12:13 +02:00
Max Kellermann
54de8b8e77
net/*, ...: use AF_LOCAL instead of AF_UNIX
2017-08-10 13:12:13 +02:00
Max Kellermann
796956970e
net/StaticSocketAddress: pass SocketAddress by value to operator!=
2017-08-10 13:12:13 +02:00
Max Kellermann
c0020142da
net/StaticSocketAddress: add method SetMaxSize()
2017-08-10 13:12:13 +02:00
Max Kellermann
ee6eea95af
net/StaticSocketAddress: set a valid size in Clear()
2017-08-10 13:12:13 +02:00
Max Kellermann
a257504ba4
mixer/Plugin: pass AudioOutput to init()
...
Fix breakage from commit bea5681fd8
2017-08-10 13:07:36 +02:00
Max Kellermann
fb0dbce15b
system/EventFD: use class UniqueFileDescriptor
2017-08-10 12:14:56 +02:00
Max Kellermann
8333551331
system/SignalFD: use class UniqueFileDescriptor
2017-08-10 12:13:41 +02:00
Max Kellermann
292d794806
system/UniqueFileDescriptor: new auto-closing FileDescriptor wrapper
2017-08-10 12:01:17 +02:00
Max Kellermann
91ce76af9d
system/FileDescriptor: add methods EnableCloseOnExec(), DisableCloseOnExec()
2017-08-10 11:54:26 +02:00
Max Kellermann
33bd9e80bb
system/FileDescriptor: add method IsReadyForWriting()
2017-08-10 11:53:43 +02:00
Max Kellermann
d310f3e9b7
system/FileDescriptor: add method IsValid()
2017-08-10 11:52:22 +02:00
Max Kellermann
8c832f4c50
system/FileDescriptor: use std::exchange()
2017-08-10 09:55:11 +02:00
Max Kellermann
31bad5f7af
output/Interface: convert to abstract class
...
Yet another C-style vtable replaced with C++.
2017-08-10 09:01:41 +02:00
Max Kellermann
1cf7f3d87c
output/Solaris: use class FileDescriptor
2017-08-10 08:56:56 +02:00
Max Kellermann
9c9a9ccd5c
output/Interface: convert to class, make attributes private
2017-08-09 17:03:07 +02:00
Max Kellermann
7381236de6
output/Interface: remove unused attribute "parent"
2017-08-09 17:03:00 +02:00
Max Kellermann
fe9ffcb9d2
Merge branch 'v0.20.x'
2017-08-08 19:30:30 +02:00
Max Kellermann
bea5681fd8
output/Interface: define a new struct AudioOutput
...
Hide struct FilteredAudioOutput from the plugins, preparing for hiding
MPD's core internals.
2017-08-08 18:58:40 +02:00
Max Kellermann
e11229494e
output/Filtered: add method NeedFullyDefinedAudioFormat()
...
Avoid accessing FilteredAudioFormat attributes directly.
2017-08-08 18:57:59 +02:00
Max Kellermann
ccc0fcb5b7
output/Shout: move ConfigureShoutAudioInfo() call to Open()
...
Configure the AudioFormat after opening the encoder, because only now
we know the final format.
2017-08-08 18:56:14 +02:00
Max Kellermann
6e24381962
output/Shout: move code to ShoutSetAudioInfo()
2017-08-08 18:56:12 +02:00
Max Kellermann
3ab905644d
output/Shout: open the encoder first, then open connection
...
This order will be necessary for proper AudioFormat initialization,
because the encoder may change the format.
2017-08-08 18:53:04 +02:00
Max Kellermann
f46d545307
output/Shout: pass shout_t* to shout_connect()
2017-08-08 18:52:03 +02:00
Max Kellermann
8134b0073b
output/Shout: move write_page() into the struct
2017-08-08 18:47:37 +02:00
Max Kellermann
6ab19c7ef2
output/Shout: pass shout_t* to handle_shout_error()
2017-08-08 18:47:30 +02:00
Max Kellermann
d22361f7c7
output/Shout: remove unnecessary nullptr check
2017-08-08 18:47:02 +02:00
Max Kellermann
06c7e55188
output/Filtered: add methods SupportsEnableDisable(), SupportsPause()
2017-08-08 15:54:49 +02:00
Max Kellermann
b3eb8489f3
output/Filtered: add a few OutputPlugin method wrappers
2017-08-08 14:27:19 +02:00
Max Kellermann
5431fca99b
output/Filtered: add attribute "log_name"
2017-08-08 14:02:58 +02:00
Max Kellermann
47c9d6ac64
output/Internal: rename source to Filtered.cxx
2017-08-07 21:50:13 +02:00
Max Kellermann
d0157af13e
filter/Internal: rename struct AudioOutput to FilteredAudioOutput
...
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann
fc04620519
output/Internal: move code to ConfigureConvertFilter()
2017-08-07 18:42:10 +02:00
Max Kellermann
d4ee165253
output/Thread: move OpenSoftwareMixer() to the end
...
This call cannot fail, but needs cleanup if others fail. By moving it
to the end, we eliminate some cleanup.
2017-08-07 18:42:09 +02:00
Max Kellermann
4f7f577a57
output/Internal: add OpenSoftwareMixer()
...
Moved code from AudioOutputControl::InternalOpen2().
2017-08-07 18:33:07 +02:00
Max Kellermann
612def5c11
output/Internal: rename CloseFilter() to CloseSoftwareMixer()
2017-08-07 18:32:43 +02:00
Max Kellermann
704825be96
mixer/Software: include cleanup
2017-08-07 18:31:11 +02:00
Max Kellermann
b8be7ec90e
filter/Normalize: add normalize_filter_prepare()
2017-08-07 18:28:52 +02:00
Max Kellermann
a3d71f4b91
filter/Convert: add convert_filter_prepare()
2017-08-07 18:27:00 +02:00
Max Kellermann
9250819b75
filter/Volume: add volume_filter_prepare()
...
Circumvent filter_new() with a fake ConfigBlock.
2017-08-07 18:23:13 +02:00
Max Kellermann
04738636ca
output/Finish: fold internal function into FinishDestroy()
2017-08-07 18:15:15 +02:00
Max Kellermann
07d1b3780d
output/Control: move two AudioOutput methods to Finish.cxx
2017-08-07 18:13:57 +02:00
Max Kellermann
27d68d8fdd
output/Internal: move the Mutex to struct AudioOutputControl
...
struct AudioOutput should not know or care about multi-threading.
2017-08-07 17:44:46 +02:00
Max Kellermann
546b773b21
output/Internal: remove mutex code from Close()
2017-08-07 17:43:58 +02:00
Max Kellermann
15dcaeda0f
output/Internal: remove mutex code from BeginPause(), IteratePause()
2017-08-07 17:40:40 +02:00
Max Kellermann
8f42ba13ef
output/Internal: simplify "return" statements in IteratePause()
2017-08-07 17:40:13 +02:00
Max Kellermann
5990017d51
output/Internal: remove mutex code from Enable() and Disable()
2017-08-07 17:39:20 +02:00
Max Kellermann
3197c0fd7d
output/Thread: move code to InternalCloseOutput()
2017-08-07 17:35:43 +02:00
Max Kellermann
4580c685f1
output/Thread: unlock the mutex for several AudioOutput calls
2017-08-07 17:08:49 +02:00
Max Kellermann
67232453d4
output/Control: more locking information in API docs
2017-08-07 16:56:41 +02:00
Max Kellermann
b4cce80727
output/Thread: move code to InternalClose()
2017-08-07 16:34:29 +02:00
Max Kellermann
89a2e5ded3
output/Thread: rename InternalClose() to InternalCheckClose()
2017-08-07 16:33:20 +02:00
Max Kellermann
9d6b4f46d4
output/Thread: move AudioOutput methods to Internal.cxx
2017-08-07 16:26:50 +02:00
Max Kellermann
a4019cb6aa
util/StringBuffer: use std::array::const_iterator
2017-08-07 16:18:43 +02:00
Max Kellermann
b0703b92c3
util/FormatString: pass the allocated buffer to AllocatedString::Donate()
...
.. and not the stack buffer. This made the AllocatedString destructor
crash.
Closes #52
2017-08-03 00:25:30 +02:00
Max Kellermann
d29bdf3e81
Merge branch 'v0.20.x'
2017-07-31 13:50:14 +02:00
Max Kellermann
dd9fd3d8a7
tag/Aiff: the FORM chunk size is big-endian
...
Was broken by commit 8a86460b8f
Closes #87
2017-07-31 13:46:09 +02:00
Matthew Leon
4c0404c70d
Check for MusicBrainz id3v2 tags in ffmpeg.
...
Addresses #82 .
Previously, the ffmpeg decoder only checked for the "generic"
MusicBrainz metadata keys used in other metadata container formats.
2017-07-20 08:28:14 +02:00
Matthew Leon
573a413ee1
move MusicBrainz id3v2 tags to separate file
...
We will reuse these tags elsewhere.
2017-07-20 08:26:29 +02:00
Max Kellermann
501a4af914
util/StringUtil: move strip functions to StringStrip.cxx
2017-07-05 17:20:02 +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
b04679b429
util/WritableBuffer: add method MoveFront()
2017-07-05 17:10:59 +02:00
Max Kellermann
19358d1c42
util/Exception: add more utility functions
2017-07-05 17:08:26 +02:00
Max Kellermann
8679074be7
util/Exception: move code to AppendNestedMessage()
2017-07-05 17:07:43 +02:00
Max Kellermann
ba09e22c30
util/Exception: add GetFullMessage(std::exception)
2017-07-05 17:07:41 +02:00
Max Kellermann
6515b9727d
util/Exception: catch std::nested_exception
2017-07-05 17:07:40 +02:00
Max Kellermann
4af8e5bdb5
util/Exception: include cleanup
2017-07-05 17:07:39 +02:00
Max Kellermann
2db8cf477b
util/Exception: add "fallback" and "separator" parameters
2017-07-05 16:59:40 +02:00
Max Kellermann
3cfefa53f7
util/Exception: rename FullMessage() to GetFullMessage()
2017-07-05 12:25:55 +02:00
Max Kellermann
bce89feb13
util/Manual: drop prefix from include guard
2017-07-05 12:25:32 +02:00
Max Kellermann
88f5220acf
util/Manual: drop support for gcc 4.6
2017-07-05 12:25:20 +02:00
Max Kellermann
3e87ac75a1
util/Manual: use C++11 initializer
2017-07-05 12:12:41 +02:00
Max Kellermann
9237f2a80c
util/{Const,Writable}Buffer: add array constructor
2017-07-05 12:09:27 +02:00
Max Kellermann
61aca389c4
util/{Const,Writable}Buffer: add typedef value_type
2017-07-05 12:08:34 +02:00
Max Kellermann
80438c4876
util/BindMethod: add BIND_FUNCTION()
2017-07-05 12:04:29 +02:00
Max Kellermann
70ac4fa96b
util/AllocatedString: implement AllocatedString<wchar_t>::Duplicate()
2017-07-05 10:26:39 +02:00
Max Kellermann
6e2b348758
output/Internal: move the "open" flag to struct AudioOutputControl
2017-06-15 22:52:46 +02:00
Max Kellermann
613dd67784
output/Internal: move the AudioOutputSource to struct AudioOutputControl
2017-06-08 22:13:47 +02:00
Max Kellermann
58683f02ec
output/Thread: move the AudioOutputSource::Open() call to InternalOpen()
...
Prepare for moving the AudioOutputSource to class AudioOutputControl.
2017-06-08 22:08:01 +02:00
Max Kellermann
7cb82fe8f3
output/Thread: move code to InternalClose()
2017-06-08 21:59:48 +02:00
Max Kellermann
0494779ecb
output/Thread: move software_mixer_set_filter() out of the "try" block
...
That function is "noexcept".
2017-06-08 21:49:41 +02:00
Max Kellermann
0500990d23
filter/volume: remove unused PcmVolume instance
2017-06-08 21:48:22 +02:00
Max Kellermann
22a82f1eaa
mixer/software, filter/volume: add "noexcept"
2017-06-08 21:45:23 +02:00
Max Kellermann
13b04dc908
mixer/Internal: add "noexcept"
2017-06-08 21:42:57 +02:00
Max Kellermann
011106b517
mixer/Internal: use C++11 initializers
2017-06-08 21:42:39 +02:00
Max Kellermann
7467b85019
output/Thread: rename audio_format to in_audio_format
2017-06-08 13:20:55 +02:00
Max Kellermann
7dea615f74
output/{Source,Thread}: make the AudioFormat parameter const
2017-06-08 13:19:34 +02:00
Max Kellermann
3010d182fc
output/Internal: move "really_enabled" flag to class AudioOutputControl
2017-06-08 09:55:49 +02:00
Max Kellermann
a72a02f0f2
output/Thread: move Enable() call to InternalEnable()
2017-06-08 09:51:13 +02:00
Max Kellermann
614df96382
output/Thread: move Enable() call out of Open()
2017-06-08 09:50:34 +02:00
Max Kellermann
669d7a6feb
output/Thread: move Close() call out of Disable()
2017-06-08 09:34:24 +02:00
Max Kellermann
d600b937f1
output/Thread: move code to InternalDisable()
2017-06-08 09:32:07 +02:00
Max Kellermann
ae713cb099
*: add lots of "noexcept" specifications
2017-06-04 13:09:11 +02:00
Max Kellermann
979f1b6c39
release v0.20.9
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
/6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
jnXnPFxqBw==
=0SSp
-----END PGP SIGNATURE-----
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
62b03cfddf
storage, db, mixer, command: remove more bogus "pure" attributes
...
This commit is similar to 788e3b31e1
,
and removes more "pure" attributes which were placed on functions that
could throw exceptions, which is illegal according to clang's
understanding of the attribute (but not according to GCC's). GitHub
issue #58 was most likely about StorageDirectoryReader::GetInfo() and
Storage::GetInfo(), which still had "pure" attributes.
Closes #58
2017-06-03 21:54:24 +02:00
Jörg Raftopoulos
18b827b979
decoder/ffmpeg: add support for adx
...
Add ffmpeg decoder support for *.adx files (Sega game console)
Closes #60
2017-06-03 20:57:20 +02:00
Max Kellermann
0a379fc514
system/ByteOrder: fix byte order detection on FreeBSD/aarch64
...
Patch from
https://svnweb.freebsd.org/ports/head/audio/musicpd/files/patch-src_system_ByteOrder.hxx?revision=441921&view=co
(with a tiny modification)
Closes #59
2017-05-29 20:37:14 +02:00
Max Kellermann
1fa1790da5
output/Internal: move the "pause" flag to struct AudioOutputControl
2017-05-23 11:23:10 +02:00
Max Kellermann
dd29e6e475
output/pulse: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:17:04 +02:00
Max Kellermann
ae4b30a697
output/httpd: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:13:41 +02:00
Max Kellermann
353299168a
output/Thread: skip WaitForDelay() after resuming playback
...
This allows removing the "base.pause" check from the JACK output
plugin, and will allow removing similar accesses from other plugins.
2017-05-23 11:00:28 +02:00
Max Kellermann
a50b2c3b85
output/Thread: rename {Play,Pause}() to Internal{Play,Pause}()
2017-05-23 10:59:17 +02:00
Max Kellermann
ebecee3d85
output/Internal: move "client" to struct AudioOutputControl
2017-05-23 00:32:03 +02:00
Max Kellermann
194f733ca7
output/MultipleOutputs: use LoadOutputControl() in AddNullOutput()
2017-05-23 00:31:31 +02:00
Max Kellermann
3907ddbcc4
output/{Internal,Control}: add "noexcept"
2017-05-23 00:17:23 +02:00
Max Kellermann
e616be0a42
output/Thread: move code to InternalOpen()
2017-05-23 00:08:36 +02:00
Max Kellermann
5eef146871
output/Internal: move several flags to struct AudioOutputControl
2017-05-22 23:40:20 +02:00
Max Kellermann
2e65686fc0
output/Control: add method Configure()
...
Prepare to move some configuration settings from AudioOutput to
AudioOutputControl.
2017-05-22 23:36:45 +02:00
Max Kellermann
e5847f1ddf
output/MultipleOutputs: move code to LoadOutputControl()
2017-05-22 23:35:32 +02:00
Max Kellermann
86d05e98e5
release v0.20.8
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkfNQ4QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEm0/D/92uGQTZ8x3qMpMN7R0jw4GBYjkqCDtz2wH
UujnfqUZfr852wkFBP3LiraicGr5dzsRwM272hlXeMDp3s3EPT8eNIgwiETDreD/
NpA/Pqyl4ZfvyPGkrtvW2ZMWENVrGjAoygHQr3evemIdH5ypxWCzSaNbiOyeabqp
+HqyOFeJckUHC70A2vOU8jredhGFYWOdKRZT9WRdBLTwaKd80DRmsKxi8d5Yc/ms
nVeGCVpF9OpyjlJu0+7v3DT0ekgTJI2CihZT3GdasCRllPa397uHiqKeah2DkOId
z1AMcxhzR+tz4cafW5iz8xtyIDdXPL+SD58wkuUDJO2ePCNRLTt1zW9ijJFWzocu
o6MTyn7mpN2Zp/dLLUrxNkNKTT/YvaaGBIn4fuLPbGQXNjITyVRkw233fOz/6c39
EOcR86ws60e4F2JLbxN3lEKL5bLkLPNK2J+xWEpRHGXy5Bfn6C8uQklno3h3urHG
DI2p+3og/+7I+MNOX88CMZBdNpfqiWKNSrSAAsi99CwIXIYz0qlKPx9qQyTK0wyh
xPrU/j5GGQqR2eoR6eChiB3LOE8SLxfeLgrMJ2HB+w550F4KxaCVxpxpWI3D0GX8
+tC4uDE+LkGdOc1pbOYUHQWNhFwy3jRxo+wkcb5wz5QXBVVEGlYqo5BcSeX1Clx+
kiO3g9SNlg==
=mUPF
-----END PGP SIGNATURE-----
Merge tag 'v0.20.8'
release v0.20.8
2017-05-19 20:13:01 +02:00
Mario Di Raimondo
ffa676f577
playlist/m3u: support for mime-type audio-mpegurl
for M3U playlists
2017-05-19 15:25:58 +02:00
Max Kellermann
cdd2d4cc1d
util/StringView: add method EndsWith()
2017-05-17 12:39:01 +02:00
Max Kellermann
3bcabad28c
net/SocketAddress: add method IsV6Any()
2017-05-17 12:22:59 +02:00
Max Kellermann
c629ac7168
net/SocketAddress: add more "noexcept"
2017-05-17 12:21:36 +02:00
Max Kellermann
0195d5590f
net/AllocatedSocketAddress: allow copying
2017-05-17 12:19:24 +02:00
Max Kellermann
e7bebb0089
net/AllocatedSocketAddress: add more "noexcept"
2017-05-17 12:07:20 +02:00
Max Kellermann
7b05df8d33
net/AllocatedSocketAddress: use C++11 initializers
2017-05-17 12:06:45 +02:00
Max Kellermann
a8db9ae304
net/StaticSocketAddress: add method SetPort()
2017-05-17 12:03:45 +02:00
Max Kellermann
e6e9b2041e
net/AllocatedSocketAddress: add method SetPort()
2017-05-17 09:36:01 +02:00
Max Kellermann
77c747a8fd
net/SocketAddress: add method GetPort()
2017-05-17 09:28:12 +02:00
Max Kellermann
907fb257cd
util/StringAPI: add StringToken(), StringIsEqualIgnoreCase(), StringCollate()
2017-05-16 23:04:27 +02:00
Max Kellermann
60bd60db03
util/String{Compare,API}: add more "noexcept"
2017-05-16 23:02:36 +02:00
Max Kellermann
0fcc28a108
util/String{Compare,API}: indent with tabs
2017-05-16 23:01:43 +02:00
Max Kellermann
ab8005f03e
util/ScopeExit: include cleanup
2017-05-16 22:56:30 +02:00
Max Kellermann
5e8f578e78
util/ConcatString: return the end pointer
2017-05-16 11:56:56 +02:00
Max Kellermann
a4b1633e11
util/ConcatString: use std::copy_n() instead of memcpy()
2017-05-16 11:56:19 +02:00
Max Kellermann
fea211a109
util/Alloc: move template functions to ConcatString.hxx
2017-05-16 11:32:55 +02:00
Max Kellermann
59e4f1ee0f
*: remove lots of GCC 4.8 fallback code
...
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
86a0a42a8d
util/StringView: add "noexcept"
2017-05-16 10:27:14 +02:00
Max Kellermann
662842126d
util/SplitString: add "noexcept"
2017-05-16 10:23:50 +02:00
Max Kellermann
66e3801b1e
util/MimeType: add "noexcept"
2017-05-16 10:23:38 +02:00
Max Kellermann
a30cf60422
util/FormatString: add "noexcept"
2017-05-16 10:22:52 +02:00
Max Kellermann
c2b8b818c7
util/DivideString: add "noexcept"
2017-05-16 10:22:36 +02:00
Max Kellermann
4284b0e2b8
util/ByteReverse: add "noexcept"
2017-05-16 10:21:59 +02:00
Max Kellermann
9def9b35b9
util/Exception: add "noexcept"
2017-05-16 10:20:17 +02:00
Max Kellermann
377a2860cc
Log: add "noexcept"
2017-05-16 10:15:43 +02:00
Max Kellermann
0a3a5a7c65
Merge branch 'v0.20.x'
2017-05-16 10:09:20 +02:00
Max Kellermann
64786ec12a
Main: omit "constexpr" on MIN_BUFFER_SIZE with GCC 4.x
2017-05-16 07:20:47 +02:00
Max Kellermann
b3c82f8886
output/{osx,haiku,pulse,sles}: add missing "noexcept"
...
Fixes build failure on OS X, closes #44 . With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +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
cde5a07981
*: remove "pure" and "const" attributes from throwing functions
...
See commit 788e3b31e1
for an explanation.
2017-05-15 23:02:10 +02:00
Max Kellermann
4faef28cc5
release v0.20.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
lPEdovokNw==
=CdDy
-----END PGP SIGNATURE-----
Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann
fa2b59df4b
Main: cap buffer_before_play at 80% to prevent deadlock
...
Closes #34
2017-05-15 22:49:31 +02:00
Max Kellermann
f41a169460
Main: enforce a reasonable minimum audio_buffer_size setting
2017-05-15 22:44:18 +02:00
Max Kellermann
f567083006
Main: refactor DEFAULT_BUFFER_SIZE to represent bytes
2017-05-15 22:40:23 +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
89b900432e
output/Internal: move thread-specific stuff to AudioOutputControl
...
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann
8bb9d0960b
output/Control: add struct AudioOutputControl
...
Will move attributes from struct AudioOutput that are specific to the
OutputThread. The new struct AudioOutputControl is a holder for the
AudioOutput pointer.
This prepares for making the output list more dynamic, to allow moving
outputs to between partitions.
2017-04-28 22:04:24 +02:00
Max Kellermann
59181ac5fb
output/Thread: move code to BeginPause(), IteratePause()
2017-04-28 22:01:20 +02:00
Max Kellermann
2a831fa547
output/Output*: drop "Output" prefix from source file name
2017-04-28 21:42:24 +02:00
Max Kellermann
b0ce551523
decoder/pcm: support audio/L24
...
Closes #31
2017-04-24 20:54:13 +02:00
Max Kellermann
8b0269c264
Merge branch 'v0.20.x'
2017-04-24 20:54:04 +02:00
Max Kellermann
6b60d1e71f
decoder/pcm: add missing nullptr check
...
Fixes a potential crash bug which is actually unreachable, because the
"pcm" plugin is never invoked when there is no (matching) MIME type.
2017-04-24 20:36:55 +02:00
Max Kellermann
d68772d45a
util/{Foreign,Static}FifoBuffer: update API documentation
2017-04-24 20:19:14 +02:00
Max Kellermann
52cb425e33
util/StaticFifoBuffer: add method GetCapacity()
2017-04-24 20:18:44 +02:00
Max Kellermann
ed3220f37f
util/{Foreign,Static}FifoBuffer: use C++11 initializers
2017-04-24 20:16:18 +02:00
Max Kellermann
f6e428ac22
Merge branch 'v0.20.x'
2017-04-24 11:44:27 +02:00
Max Kellermann
45fbafae94
decoder/pcm: split variable "frame_size" in "in_*" and "out_*"
2017-04-24 11:32:52 +02:00
Max Kellermann
803b73a34b
pcm/PcmPack: add pcm_unpack_24be()
2017-04-24 11:32:52 +02:00
Max Kellermann
7b7fb5acd5
decoder/pcm: fix potential assertion failure in FillBuffer()
...
After a seek failure, the buffer may still be full, and then
FillBuffer() aborts with assertion failure.
2017-04-24 11:20:37 +02:00
Max Kellermann
b1512201ab
pcm/PcmPack: remove obsolete code comment
2017-04-22 09:52:10 +02:00
Max Kellermann
424e9cbc43
pcm/PcmPack: simplify unpack_sample()
2017-04-22 09:28:54 +02:00
Max Kellermann
95b62a843a
Merge branch 'add-original-year-tag' of git://github.com/tremby/MPD
2017-04-21 18:55:34 +02:00
Bart Nagel
ccb4f44caf
Add support for the OriginalDate tag
...
See https://picard.musicbrainz.org/docs/mappings/
This tag is useful when the user would like all releases of the same
album to be sorted next to each other.
2017-04-21 09:43:26 -07:00
Max Kellermann
c788c76dc9
output/Internal: add method IsBusy()
2017-04-18 23:15:46 +02:00
Max Kellermann
2e4e1c7f48
output/Control: drop "Output" prefix from file name
2017-04-18 22:36:48 +02:00
Bart Nagel
0a7d612f41
Remove some redundant code
2017-04-18 16:10:38 +02:00
Max Kellermann
38da76bbe0
util/ScopeExit: copy enabled tag in move constructor
2017-04-12 13:11:43 +02:00
Max Kellermann
504f5f7bdd
storage/FileInfo, db/simple/Directory: use 64 bit for device/inode
...
An ino_t is usually a 64 bit integer, and some file systems (such as
Linux's kernel NFS client) really uses the upper 32 bit. This can
lead to false positives in the directory loop detection in
FindAncestorLoop(). Increasing these two attributes (in
StorageFileInfo and Directory) to 64 bit adds little overhead, but
makes the check a lot safer.
2017-04-06 09:58:25 +02:00
Max Kellermann
f85d4d28d1
output/alsa: work around dmix non-blocking snd_pcm_drain() bug
...
See code comment. Bug was reported against MPD, but it's really an
alsa-lib bug.
https://bugs.musicpd.org/view.php?id=4662
2017-03-29 20:36:04 +02:00
Max Kellermann
b4e4bdcda9
lib/alsa/Version: wrapper for snd_asoundlib_version()
2017-03-29 20:33:06 +02:00
Max Kellermann
dae8b78569
output/httpd: copy the Page reference; fixes use-after-free
2017-03-29 20:17:09 +02:00
Max Kellermann
e26d49efb7
release v0.20.6
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAljCzQcQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEnIXD/9ltsmg3VC81NHOmcUehFgUaLyNh8o2iEr9
tQfdydQxfTXBIGztMoPsPz71da8BIqAgMTCTGAEpTUXIW6ViGkgsoDlR2fAOagG2
ybHn2q3WsPERJvkGZ4xIo0ti0pLLy7wrFpmShgOKuwb6YqOgSV+rbu/CaQanxVJE
S599vo6rV/OI4KFSYWJbfafifN/Mqmzfl/D/tB5xaMvhas60XZ6pZTp/xH8OlnML
8qkgPmN3gJe7DPq6L3rdwKobJuS1X6NLHSp1DyGVRy68B0sd3tMmbOocMeyi1OlE
1z/n/M+dcSUhdHAh/Pg0wrvH0UpUlJ11blSDiWB9gqr9oOvCZO+OcPCnk0QJrqq+
qselDNWBLvVPESbxlPO4OUbV6jxPPhVgz18RYl6JaJeUFjXkuiytI/t6jsbVM3+f
ZC1UgO+TznCuDjjMj35RP9QDkUQpuH6CK4+tyxbH7Fe4KQi02FQdtK8Q/CnESBLl
alTLYQk7VlwL1oMgezoZfTLDbsihRrEO6Y0cp/pObUrEjQ65706UGUf61PRQGBM9
DlEPqfuH8TMgksxDIrkt68pWjyCXhhUCA+RsyFJoMp7Xq6Gy2pZUn2yKCmTXLte/
v5xW9FuiSvKUKlvYbfk/q3u/GTCJELf0eY3y0Eryqp6nOEZHmzz8HOF7Bs2PxM3B
eU/fEKWxVQ==
=21bM
-----END PGP SIGNATURE-----
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
Max Kellermann
1b6666fa39
Partition: handle SYNC_WITH_PLAYER before TAG_MODIFIED
...
The TAG_MODIFIED handler (i.e. playlist::TagModified()) works only if
the modified song is the current song - something that is not updated
until SYNC_WITH_PLAYER is finished. This fixes tag updates right
after a new song is started.
2017-03-10 16:11:34 +01:00
Max Kellermann
1dd01c99e8
decoder/sidplay: make compatible with libsidplayfp < 1.8
...
https://bugs.musicpd.org/view.php?id=4665
2017-03-10 13:48:52 +01:00
Thomas Zander
d50b30a498
Add missing include for cstdlib, otherwise free() is undefined
2017-03-07 20:02:36 +01:00
Max Kellermann
42a3a87f13
util/HugeAllocator: paranoid check for sysconf()<0
...
Just in case.
2017-03-01 21:50:26 +01:00
Ben Boeckel
9dfedbe619
ReusableArray: fix build error on GCC7
...
GCC7 outputs the following error without this change:
src/util/ReusableArray.hxx:61:35: error: no matching function for call to ‘swap(size_t&, const size_t&)’
std::swap(capacity, src.capacity);
which can be resolved by just using an rvalue-reference rather than a
const rvalue-reference.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
2017-03-01 19:38:41 +01:00
Max Kellermann
b2f2c9322b
db/simple/Mount: workaround for libc++
2017-03-01 17:31:26 +01:00
Max Kellermann
3be2051808
decoder/Thread: check ENABLE_FFMPEG, not HAVE_FFMPEG
...
This repairs the damage to commit 74dbaade6f
done by commit
b3f5b4932c
2017-03-01 17:06:23 +01: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
e22a4fdba4
command/Error: improve libstdc++ 4.9.x detection for std::rethrow_if_nested() workaround
2017-03-01 16:38:22 +01:00
Max Kellermann
29a7b2c5b5
decoder/mpcdec: ignore empty frames
...
https://bugs.musicpd.org/view.php?id=4656 describes a crash due to
division by zero because frame.samples==0. This should never happen,
but apparently can happen after seeking. The best we can do is to
just ignore this frame.
2017-03-01 16:13:21 +01:00
Max Kellermann
e9e853b19a
command/Partition: add command "partition" to switch to another partition
2017-02-25 10:26:33 +01:00
Max Kellermann
e48ea5f23a
Instance: add method FindPartition()
2017-02-25 10:26:33 +01:00
Max Kellermann
a99bab935a
Client: add method SetPartition()
2017-02-25 10:25:16 +01:00
Max Kellermann
3eee35e1f7
Client: convert partition to pointer
...
Prepare to make it mutable.
2017-02-25 10:23:23 +01:00
Max Kellermann
c7396b0675
Client: add method GetPartition(), make partition private
2017-02-25 10:20:09 +01:00
Max Kellermann
e3ee60e7af
command/storage: use Instance::EmitIdle()
...
These events are relevant for all partitions.
2017-02-25 10:20:07 +01:00
Max Kellermann
05b8ddac4c
Client: add method GetInstance()
2017-02-25 10:20:05 +01:00
Max Kellermann
668724de4e
Client: replace playlist and player_control with getter methods
...
Prepare to convert "partition" to a mutable pointer.
2017-02-25 09:24:19 +01:00
Max Kellermann
71ce1a25dd
SongPrint: remove Storage::MapToRelativeUTF8() call
...
This code (added 7 years ago with commit b233c145f
) has been obsoleted
by the SongLoader class (added 3 years ago).
2017-02-24 13:56:13 +01:00
Max Kellermann
cd522f524d
fs/Traits: allow base to end with a slash in Relative()
...
Fixes false negatives:
http://foo/dav/example.ogg mismatches http://foo/dav/
.. because StringAfterPrefix() returns just "example.ogg", without
trailing slash (it existed, but was eaten already by the base
matcher).
2017-02-24 13:50:29 +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
1d445d1039
SongPrint: move duplicate code into PrintRange()
2017-02-20 22:00:11 +01:00
Max Kellermann
29d03ab937
release v0.20.5
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlirVtMQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEgbaD/9tgcgcnbiWGkNDMf0qfqfaiY80wA4HbSBT
qbKzan/kuiPXL6xcgw8YRYdAjyaIyw//f1q0SL8/LKvVQ4CrlTEQzOQUzrAOe02n
m35/6YKZVzziMRwuSZY4oQ4WH7SE87gthYIykRt59adznr2QNtQe53SnXd8ukGtf
l8xlLNuIiEwIo5PZ8ObEZH1dUP1PWtfJlxQfbJ2JhZTOR/qPfrpIzSK4GVY0ZXdz
EO6BIZyDgPfeZCPBZqiKmw4vcdIHBhG9ZgtOhX3YATV7ZSYqmjrUcjzEsoyQlOaH
rhe/whl272TQYdj95//BnqI899NVSNRYg6XXGlCB5TXqFscoDCW6JXvVAaTfB0Yg
vMV7ZYX8auu2i013O51yoj8/ofNmOjqbX9eui+gJx6Xb6Zr9Ttma5woYRh14NXwd
15KObGCd1LADpiOZ2XQ8Snlu8QlZ+PXr8RpLh9uSwDe7heemMRKqDZEf3AxfP3wO
GUOK4EHfZ5kZQHlWLA3u59Zopo1ZJjL6EJUTG3Qk+n/Wob/S2F/v5IFIdyaEFTKI
hrcTEQ/EmXZ9vc5Iw/LnIM49pO3kZXKQ9bSrZoi0kjk2AN6XBMmJNoYv/+huc2U9
JiCcyM8olCWcSQnPGjoHWxBGLhxNXtR+WYu/tEEq3+D2PFdkfOap3ApP1qdi+JPd
JFps/sOkgQ==
=4+OJ
-----END PGP SIGNATURE-----
Merge tag 'v0.20.5'
release v0.20.5
2017-02-20 21:59:40 +01:00
Max Kellermann
bc1c927952
util/TimeFormat: suppress -Wunused on Windows
2017-02-20 21:44:01 +01:00
François Revol
46aa4d2f91
haiku: fix build
...
Some missing bits when converted to C++ exceptions...
2017-02-20 11:25:00 +01:00
Max Kellermann
512e81c629
output/httpd: use emplace() instead of push()
2017-02-19 20:48:17 +01:00
Max Kellermann
452666f742
output/httpd: wake up the I/O thread only if pages have been read from encoder
2017-02-19 20:46:20 +01:00
Max Kellermann
72008d951b
output/httpd: no mutex lock while reading data from encoder
2017-02-19 20:45:16 +01:00
Max Kellermann
72146e7800
output/httpd: use std::lock_guard
2017-02-19 20:43:45 +01:00
Max Kellermann
f7af1bb8e2
output/httpd: cancel the DeferredMonitor in Close()
2017-02-19 20:41:34 +01:00
Max Kellermann
f88f1fca3f
output/httpd: move Close() lock into the I/O thread
...
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann
26e4a40cc7
output/httpd/Page: use std::shared_ptr instead of class RefCount
2017-02-19 20:17:57 +01:00
Max Kellermann
8b1931072a
output/httpd/Page: no variable size, use AllocatedArray
...
Using variable-size objects is not worth the trouble here. Let's drop
this and use existing and simpler code.
2017-02-19 20:13:41 +01:00
Max Kellermann
45e15b6cc6
output/httpd/Page: make all attributes private
2017-02-19 20:13:35 +01:00
Max Kellermann
be7e52c882
output/httpd/Page: remove unused method Concat()
2017-02-19 20:13:19 +01:00
Max Kellermann
4162ce0bc5
output/httpd/Page: use uint8_t instead of unsigned char
2017-02-19 19:49:53 +01:00
Max Kellermann
7e46277016
Merge branch 'v0.20.x'
2017-02-19 19:46:18 +01:00
Max Kellermann
f3b788703e
tag/Handler: improve snprintf() return value check
2017-02-19 19:34:13 +01:00
Max Kellermann
4bb83781e8
output/httpd/IcyMetaDataServer: cast length to unsigned
...
Fixes another buffer overflow: if the stream has a very long title or
URL, resulting in a metadata string of more than 2 kB, icy_string[0]
is a negative value, which gets casted to size_t - ouch!
https://bugs.musicpd.org/view.php?id=4652
2017-02-19 19:28:52 +01:00
Max Kellermann
a73195b7cc
output/httpd/IcyMetaDataServer: pad the string with 15 spaces
...
Fixes a buffer overflow due to the bad formula rounding the buffer
size up. At the same time, remove the "+1" from the meta_length
calculation, which takes the padding into account and at the same time
implements proper rounding.
2017-02-19 19:27:37 +01:00
Max Kellermann
1bd00b8a9a
output/httpd/IcyMetaDataServer: remove the int cast
...
Why did this cast exist??
2017-02-19 19:27:37 +01:00
Max Kellermann
3b84b99804
IdleFlags: add a "partition" event
2017-02-17 23:59:06 +01:00
Max Kellermann
1786f9b1bb
command/Partition: add command "newpartition"
2017-02-17 23:53:49 +01:00
Max Kellermann
1e972174a6
output/MultipleOutputs: add method AddNullOutput()
2017-02-17 23:53:49 +01:00
Max Kellermann
77178e0590
Instance: make "partition" a std::list
...
With this commit, multi-player support becomes possible... it's just
not wired to the frontend yet.
This is based on massive amounts of refactoring work I did over the
past 9 years.
2017-02-17 23:22:29 +01:00
Max Kellermann
9a909d9f27
Instance: un-inline the constructor
2017-02-17 23:22:05 +01:00
Max Kellermann
90d25a40a0
Instance: use C++11 initializer
2017-02-17 23:21:55 +01:00
Max Kellermann
c335f18be7
Partition: add "name" attribute
2017-02-17 23:18:51 +01:00
Max Kellermann
7dc3e73782
command: add command "listpartitions"
...
The first step to multi-player support. Not much, just a dummy
command.
2017-02-17 23:07:31 +01:00
Max Kellermann
47dffe66aa
output/alsa: fix race condition on early snd_pcm_writei() error
...
During UnlockActivate() while the mutex is unlocked, the IOThread can
set a new error condition, and will never again wake up the
OutputThread. This race condition can cause a deadlock in the
OutputThread.
2017-02-15 11:23:44 +01:00
Max Kellermann
6636c69a11
storage/FileInfo: convert mtime to std::chrono::system_clock::time_point
2017-02-11 23:45:15 +01:00
Max Kellermann
0ccaf4a1ff
storage/FileInfo: add initializing constructor
2017-02-11 23:45:14 +01:00
Max Kellermann
5cdbad7937
db/simple/Directory: make parent and path const
2017-02-11 23:45:14 +01:00
Max Kellermann
fc0508c047
db/simple/Directory: use C++11 initializers
2017-02-11 23:45:14 +01:00
Max Kellermann
78ca5491e6
db/Interface: GetUpdateStamp() returns std::chrono::system_clock::time_point
2017-02-11 23:02:17 +01:00
Max Kellermann
4146475c73
util/ChronoUtil: new utility library for std::chrono
2017-02-11 22:23:33 +01:00
Max Kellermann
329c3ab21b
fs/FileInfo: use std::chrono::system_clock
2017-02-10 23:48:21 +01:00
Max Kellermann
3b7f6641d2
TimePrint: std::chrono::system_clock support
2017-02-10 23:48:21 +01:00
Max Kellermann
781487c4dd
thread/Thread: use BoundMethod
2017-02-10 22:46:09 +01:00
Max Kellermann
5ba5bc8ba1
thread/Thread: move code to Run()
2017-02-10 22:43:55 +01:00
Max Kellermann
82c66ce078
thread/Thread: Start() returns void
...
Since we switched to C++ exceptions, there is no code path which
returns false.
2017-02-10 22:41:29 +01:00
Max Kellermann
9324fbf921
event/Thread: remove the Mutex
...
We don't need to access Thread::handle early inside the EventThread,
so we don't need this trick anymore.
2017-02-10 22:29:31 +01:00
Max Kellermann
5e081de14a
IOThread: move EventThread instance into struct Instance
...
Eliminate global variables.
2017-02-10 22:25:06 +01:00
Max Kellermann
115af4f565
event/Loop: Break() is no-op if "quit" is already set
2017-02-10 22:24:48 +01:00
Max Kellermann
822724d1aa
event/Thread: auto-stop in the destructor
2017-02-10 22:24:46 +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
835136dcd3
output/Thread: add assertion on the ao_plugin_play() result
2017-02-10 22:24:36 +01:00
Max Kellermann
4a80e9cb25
output/alsa: copy the PcmExport result to the ring_buffer
...
.. and not the input data.
Regression from commit b1c7649edb
(integer underflow).
https://bugs.musicpd.org/view.php?id=4639
2017-02-10 22:23:00 +01:00
Max Kellermann
de80c270bd
IOThread: move code to class EventThread
2017-02-10 21:40:39 +01:00
Max Kellermann
b92bff2658
IOThread: remove unused function io_thread_inside()
2017-02-10 21:40:30 +01:00
Max Kellermann
42f1e26540
IOThread: remove unused Cond variable
2017-02-10 21:29:54 +01:00
Max Kellermann
cfd056231b
output/alsa: use the EventLoop& parameter instead of io_thread_get()
2017-02-10 21:21:15 +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
b1c7649edb
output/alsa: non-blocking mode
...
Use SND_PCM_NONBLOCK, and perform all snd_pcm_writei() calls in the
IOThread. Use a lockless queue to copy data from the OutputThread to
the IOThread.
This rather major change aims to improve MPD's internal latency. All
waits are now under MPD's control, instead of blocking inside
libasound2.
As a side effect, an output's filter is now decoupled from the actual
device I/O, which solves a major latency problem with the conversion
filter on slow CPUs and small period buffers. See:
https://bugs.musicpd.org/view.php?id=3900
2017-02-09 21:36:18 +01:00
Max Kellermann
853740f1e2
Main: use the IOThread for outputs and mixers
...
The main EventLoop can block for a long time while a client's command
runs, and is therefore inappropriate for internal engine I/O. This
fixes a serious regression for at least the "httpd" output, which used
to be hard-coded for the IOThread, but now receives the main EventLoop
as an initialization parameter.
For the mixers, this doesn't make much of a difference. They are not
latency critical.
2017-02-09 21:33:49 +01:00
Max Kellermann
14986b153a
event/Loop: use std::lock_guard
2017-02-09 21:26:55 +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
7372c931b3
event/Loop: make IsInsideOrNull() available in the NDEBUG build
...
Fixes build breakage by commit 4e5271fcdf7; and this method does make
sense in non-debug builds.
2017-02-09 21:21:49 +01:00
Max Kellermann
29e1b6e465
mixer/alsa: reset the MultiSocketMonitor in the destructor
...
Fixes potential crash bug.
2017-02-09 21:13:19 +01:00
Max Kellermann
eda06993f8
event/MultiSocketMonitor: add method Reset()
2017-02-09 21:12:23 +01:00
Max Kellermann
4b30ef1cf2
event/MultiSocketMonitor: use C++11 initializer
2017-02-09 21:12:23 +01:00
Max Kellermann
e92e5e8eb8
event/MultiSocketMonitor: more API documentation
...
Now ClearSocketList() may only be called from PrepareSockets().
Calling it before destroying the object doesn't work properly, because
it doesn't unregister the TimeoutMonitor and the IdleMonitor. Some of
its callers need to be fixed.
2017-02-09 21:12:23 +01:00
Max Kellermann
4e5271fcdf
event/Call: allow usage during shutdown
...
Change EventLoop::IsInside() call to EventLoop::IsInsideOrNull().
This means that BlockingCall() may be used during shutdown, after the
main EventLoop::Run() has finished. This is important because mixers
are currently registered in the main EventLoop.
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
3850716522
command/Database: add "sort" parameter to "find" and "search"
...
Implement the second part of https://bugs.musicpd.org/view.php?id=3990
2017-02-08 11:22:08 +01:00
Max Kellermann
e9c99e0518
DetachedSong: add LightSong cast operator
2017-02-08 10:38:25 +01:00
Max Kellermann
332baa4f67
DetachedSong: don't declare empty destructor
...
An explicit destructor prevents usage of implicit move operators, even
if it's empty. Therefore, declaring a defaulted destructor with GCC
attribute "noinline" does what we want without preventing those
implicit operators.
2017-02-08 10:24:45 +01:00
Max Kellermann
08879d2a20
DetachedSong: add move operator
2017-02-08 10:24:40 +01:00
Max Kellermann
1292af4768
Revert "DetachedSong: remove explicitly-defaulted copy/move constructors"
...
This reverts commit 67b7d46432
.
Turns out I was wrong, and mentioning these does make a difference:
the implicit move constructor is not defined in the presence of a
user-declared destructor.
2017-02-08 10:21:35 +01:00
Max Kellermann
4d88a099f9
Compiler.h: add gcc_noinline
2017-02-08 10:17:21 +01:00
Max Kellermann
777e15bd78
db/DatabaseSong: make the Storage optional
...
Some database plugins don't use a Storage (e.g. UPnP), and with this
plugin, DatabaseDetachSong() can crash.
2017-02-08 10:05:55 +01:00
Max Kellermann
f689e28958
SongLoader: return instance, not pointer
2017-02-08 10:02:08 +01:00
Max Kellermann
d184231169
db/DatabaseSong: DatabaseDetachSong(uri) returns instance, not pointer
2017-02-08 09:59:12 +01:00
Max Kellermann
7225e919fc
db/DatabaseSong: use AtScopeExit()
2017-02-08 09:58:40 +01:00
Max Kellermann
7a185f1ead
queue/PlaylistUpdate: assert Database::GetSong()!=nullptr
2017-02-08 09:53:14 +01:00
Max Kellermann
c1fa5279f4
db/Interface: clarify GetSong() error handling
2017-02-08 09:50:30 +01:00
Max Kellermann
4f0fe66f69
DetachedSong: make the LightSong constructor public
...
Sometimes, it's useful to construct a DetachedSong from a LightSong
even without having real_uri initialized.
2017-02-08 09:45:37 +01:00
Max Kellermann
76380b2b45
DetachedSong: pass std::string&& to uri initializer
...
Eliminate one temporary allocation.
2017-02-08 09:42:09 +01:00
Max Kellermann
67b7d46432
DetachedSong: remove explicitly-defaulted copy/move constructors
...
Mentioning these doesn't make a difference.
2017-02-08 09:40:29 +01:00
Max Kellermann
29453ba196
client: add tag_mask attribute
...
The "tagtypes" command now has several sub commands which can be used
to edit that mask.
2017-02-08 09:06:11 +01:00
Max Kellermann
599d77643b
client/Response: add method GetClient()
2017-02-08 09:06:11 +01:00
Max Kellermann
09d87d5ef1
command/Other: move some functions to ClientCommands.cxx
...
handle_tagtypes() is also being moved to ClientCommands.cxx, because
that command will be extended to access client-specific settings.
2017-02-08 09:06:11 +01:00
Max Kellermann
2f3f075e4f
tag/Mask: wrap in class
2017-02-08 09:04:45 +01:00
Max Kellermann
17097d96b7
db/{Count,Print}: use tag_print(), eliminate duplicate code
2017-02-08 09:04:41 +01:00
Max Kellermann
a3e28c2d1a
tag/Tag: move tag_name_parse() to ParseName.cxx
2017-02-08 08:57:22 +01:00
Max Kellermann
03a97d87ea
tag/Tag*: rename several source files
2017-02-08 08:49:42 +01:00
Max Kellermann
8cbf099054
tag/Id3Load: update API documentation
2017-02-08 08:48:44 +01:00
Max Kellermann
07ce915c66
Merge branch 'v0.20.x'
2017-02-08 08:45:24 +01:00
Max Kellermann
53c14d97a6
lib/nfs/FileReader: remove debug line
2017-02-08 08:43:56 +01:00
Max Kellermann
69a82eec17
tag/TagId3: use AtScopeExit() for exception-safety
2017-02-06 23:32:07 +01:00
Max Kellermann
45cadef22f
configure.ac: prepare for 0.20.5
2017-02-06 23:28:36 +01:00
Max Kellermann
73f58c57e8
storage/curl: use CURLOPT_POSTFIELDS instead of CURLOPT_READFUNCTION
2017-02-06 23:25:03 +01:00
Max Kellermann
43348a3e13
decoder/Control: improve locking in Start() and Seek()
...
Previously, both methods accessed a lot of attributes which require
mutex protection.
2017-02-05 13:37:20 +01:00
Max Kellermann
e716b1f4d7
Client: remove redundant "virtual" keywords
2017-02-03 22:27:11 +01:00
Max Kellermann
82e74a4ebd
Client: make client_vprintf() static
2017-02-03 20:47:41 +01:00
Max Kellermann
16b260e371
Client: eliminate client_puts(), use Client::Write() instead
2017-02-03 20:46:53 +01:00
Max Kellermann
3102e05da4
Client: make attributes "uid" and "num" const
2017-02-03 20:41:31 +01:00
Max Kellermann
df4af2b550
release v0.20.4
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAliSTDkQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEsIQD/4iNkylzLp8mID2aFT690MFzv4TRXi2XS7v
r3Rlx3hpGyDdzeXZeFc5zxsc9Ei8OfLcdFC/Umj9LjQanXakOxwsdhagrW9cadNX
YLxkyVcREXalmzUvoWeRnya1LjoTdYA8llvG2tAJosXVr0o/GHZi56aHcrYnW2a6
XD8kEk5k9beuEcBLk1rdZCTGPbVLwCFvMcpZ7j5Hd4kDGQjjw2aoEaPWchJdhLQh
p+GRSU+A8hyTo9zy+aNO3cKvq6zqVxDLlHnIqh8XPWQoLPyWuD7ETvwERKmdmiPZ
bSo0MR7azTlhkWbNZxjPHgZuacJDlwKvXPg1ofjn8VVcaVe5ONeX+1WP0ozUYqyU
fmhLxMHKuwZcKo6do/jNhAVp//VBWhSwJHPA8kjBTuZHHc0HvgyTxlAgvzlrSswe
dxc8vnvzgJfUKz5k7mf3amVg6Cu1CmNi59CkyL0NL+8N0inyMfdeQuQEYgbPoI6X
jIRwACfXpMX75VtiDaNpnFLBjL5emE6u2bDoU2c5ezgpthaWjb0PqSmoLBBF8TNm
k0ecXlIwCjT3pDcqmFdqgG3AJiYLTgX0rETC8PInl6toLzr2oVMVlijU3YK5PjMl
nTvgs8TwprTWImgcBnidqRMb39p3AKs12pHfZ4Y5Iu82Bm60acZQMkv6sQh43Wyc
+W2+T3D2IA==
=b2Fz
-----END PGP SIGNATURE-----
Merge tag 'v0.20.4'
release v0.20.4
2017-02-01 22:05:33 +01:00
Max Kellermann
591afa0647
lib/nfs/Connection: detect socket hangup and unregister from epoll
...
Fixes race condition when epoll_ctl() gets called after the socket has
been closed, which may affect a different socket created by another
thread meanwhile.
2017-02-01 21:44:20 +01:00
Max Kellermann
05eac20ffe
lib/nfs/Connection: detect libnfs reconnect
...
When rpc_reconnect_requeue() gets called from inside nfs_service(),
the NfsInputStream can stall completely because the old socket has
been unregistered from epoll automatically, but the new one has never
been registered. Therefore, nfs_service() will never be called again.
This kludge attempts to detect this condition by checking
nfs_which_events()==POLLOUT.
https://bugs.musicpd.org/view.php?id=4081
2017-02-01 21:36:58 +01:00
Max Kellermann
38d263ac19
output/sndio: work around a libroar C++ incompatibility
...
Same as in commit e02d8ad8d2
, but this time for the sndio plugin
which can be emulated by libroar.
2017-02-01 19:53:23 +01:00
Thomas Zander
f71c204eef
Correct method types to match Interface.hxx
2017-01-31 21:22:02 +01:00
Thomas Zander
51147203be
free() require cstdlib to be included
2017-01-31 21:21:37 +01:00
Max Kellermann
a931686317
pcm/SampleFormat: workaround for GCC 4.9 "constexpr" bug
...
GCC 4.9 has incomplete C++14 support. Specifically, it doesn't allow
switch/case in "constexpr" functions.
2017-01-27 11:02:58 +01:00
Max Kellermann
add953fb6e
lib/curl/Global: decouple from the IOThread library
2017-01-26 09:29:49 +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
d4993c405e
lib/nfs/Glue: add EventLoop& accessor
2017-01-26 09:23:25 +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
4140e9b857
IOThread: make io_thread_run() static
2017-01-25 23:00:31 +01:00
Max Kellermann
8fd9d91974
output/Plugin: pass EventLoop& to init()
...
Eliminate dependency on io_thread_get().
2017-01-25 22:54:41 +01:00
Max Kellermann
d3f35dab1e
output/ao: convert to class, make attributes private
2017-01-25 10:46:09 +01:00
Max Kellermann
487e2618cd
output/ao: use AudioOutputWrapper
2017-01-25 10:45:20 +01:00
Max Kellermann
30d5186db4
output/ao: use const_cast instead of the union hack
2017-01-25 10:44:19 +01:00
Max Kellermann
cbe59714d4
output/solaris: convert to class, make attributes private
2017-01-25 10:33:38 +01:00
Max Kellermann
704a28ca17
output/solaris: use AudioOutputWrapper
2017-01-25 10:29:42 +01:00
Max Kellermann
8d70d10aba
output/httpd: use AudioOutputWrapper
2017-01-25 10:05:08 +01:00
Max Kellermann
ddd8b16f2b
output/roar: use AudioOutputWrapper::Init()
2017-01-25 10:05:08 +01:00
Max Kellermann
b79ce77ec5
output/Wrapper: add missing include
2017-01-25 10:05:08 +01:00
Max Kellermann
fead4bbfd9
output/Plugin: convert pointers to references
2017-01-25 09:48:59 +01:00
Max Kellermann
68bb738af2
input/alsa: use snd_pcm_?w_params_alloca()
2017-01-25 08:47:20 +01:00
Max Kellermann
6b968beede
output/alsa: convert to class, make attributes private
2017-01-24 23:08:16 +01:00
Max Kellermann
f68dd1bffb
output/alsa: make AlsaSetup() an AlsaOutput method
2017-01-24 23:06:33 +01:00
Max Kellermann
f92b71ca99
output/alsa: move code from AlsaSetup() to AlsaSetupSw()
2017-01-24 23:05:29 +01:00
Max Kellermann
2b79fe2d6a
output/alsa: move code from AlsaSetup() to AlsaSetupHw()
2017-01-24 22:48:48 +01:00
Max Kellermann
44dd9af276
lib/upnp/Util: pass single delimiter character to stringToTokens()
2017-01-23 19:34:55 +01:00
Max Kellermann
d3013d4f8c
lib/upnp/Util: remove parameter "skipinit", always true
2017-01-23 19:28:07 +01:00
Max Kellermann
678524ad21
lib/upnp/WorkQueue: fix race condition
...
With "ok==false", newly created threads may quit instantly.
2017-01-23 19:25:30 +01:00
Max Kellermann
32a64481f2
lib/upnp: fix bad std::chrono cast
...
libupnp provides seconds, not whatever time unit is used by
std::chrono::steady_clock.
2017-01-23 19:16:14 +01:00
Max Kellermann
1776015c6c
db/simple: drop redundant "virtual"
2017-01-23 18:57:23 +01:00
Max Kellermann
f1c71a26e3
db/proxy: drop redundant "virtual"
2017-01-23 18:56:45 +01:00
Max Kellermann
e78ab767d3
db/proxy: make connect errors during startup non-fatal
2017-01-23 18:55:40 +01:00
Max Kellermann
f01eb2f95d
db/proxy: improve Connect() error message
2017-01-23 18:55:18 +01:00
Max Kellermann
1450e45d97
Main, db/Glue: improve error messages
2017-01-23 18:52:16 +01:00
Max Kellermann
ec8cba369c
lib/upnp/WorkQueue: disallow copying
2017-01-23 18:35:58 +01:00
Max Kellermann
f4c248f406
lib/upnp/WorkQueue: make constructor explicit
2017-01-23 18:35:47 +01:00
Max Kellermann
f3b2a58646
lib/upnp/WorkQueue: use C++11 initializers
2017-01-23 18:35:22 +01:00
Max Kellermann
c6f89c42b2
db/proxy: make the base class of LibmpdclientError public
...
If the base class is not accessible, the "catching" the base class
won't work. This caused the fatal error:
terminate called after throwing an instance of 'LibmpdclientError'
2017-01-23 18:28:40 +01:00
Max Kellermann
5e93cfdd9e
output/Source: reset the ReplayGain serials ion OpenFilter()
...
Each close/open cycle resets the Filter's state, because a new Filter
instance is being created. That results in the serials
(replay_gain_serial and other_replay_gain_serial) being out of sync
with the internal ReplayGainFilter state.
So instead of initializing those serials once, we need to initialize
them each time we create new ReplayGainFilter instances, i.e. in
OpenFilter().
https://bugs.musicpd.org/view.php?id=4632
2017-01-23 17:55:04 +01:00
Max Kellermann
d91d5a3ab5
playlist/SoundCloud: eliminate unnecessary casted variable
2017-01-20 17:16:11 +01:00
Max Kellermann
df9a665994
pcm/Traits: add "SILENCE" attribute
2017-01-20 15:57:09 +01:00
Max Kellermann
7a098ca0ed
pcm/Traits: add specialization for SampleFormat::DSD
2017-01-20 15:48:30 +01:00
Max Kellermann
33716732a1
pcm/PcmChannels: silence surround channels when converting from stereo
...
Previously, there was no special code to convert stereo to
multi-channel. The generic solution for this was to convert to mono,
and then copy the result to all channels. That's a pretty bad
solution, but at least something which always renders audio. MPD does
something, instead of failing.
Now that MPD has proper support for multi-channel (by defining the
channel order), we can do better than that. It is a (somewhat) common
case to play back stereo music on a DAC which can only do
multi-channel. The best approach here is to copy the stereo channels
to front-left and front-right, and apply the "silence" pattern to all
other channels.
2017-01-19 10:53:41 +01:00
Max Kellermann
97ae594375
DetachedSong: use C++11 initializers
2017-01-18 13:13:36 +01:00
Max Kellermann
3f321ae9a0
pcm/SampleFormat: make the two inline functions "constexpr"
2017-01-17 22:52:09 +01:00
Max Kellermann
161d32a7e7
AudioFormat: update ToString() API documentatio
2017-01-17 22:48:34 +01:00
Max Kellermann
d7137586a9
Audio{Format,Parser}: use shortcuts such as "dsd64" in log messages
2017-01-17 22:42:23 +01:00
Max Kellermann
39114f91a7
AudioFormat: replace struct audio_format_string with class StringBuffer, return it
2017-01-17 22:18:21 +01:00
Max Kellermann
4f01387edf
util/StringBuffer: new utility class
2017-01-17 22:03:42 +01:00
Max Kellermann
de3e0585f1
AudioFormat: move enum SampleFormat to pcm/SampleFormat.hxx
2017-01-17 22:01:01 +01:00
Max Kellermann
6eea56861b
AUTHORS, ...: update my email address
2017-01-17 11:54:55 +01:00
Max Kellermann
dcbab8e37a
PlaylistFile: "playlistadd" creates new playlist if it does not exist, as documented
2017-01-16 20:55:19 +01:00
Max Kellermann
5677278251
CommandLine: update copyright year
2017-01-16 12:04:04 +01:00
Max Kellermann
d14ec6aea5
output/Thread: reconfigure ConvertFilter for its new input AudioFormat
...
If the input AudioFormat changes but the out_audio_format doesn't
change (e.g. because there is a fixed "format" setting in this
"audio_output" section), the ConvertFilter needs to be reconfigured.
This didn't happen, resulting in awful static noise after changing
songs.
2017-01-15 01:24:17 +01:00
Max Kellermann
917cedf893
output/Thread: move AudioFormat logging code around
2017-01-15 01:23:49 +01:00
Max Kellermann
193dd71600
output/Thread: remember the original filter audio format in local variable
2017-01-15 01:21:14 +01:00
Max Kellermann
6c293a3d7f
lib/nfs: add more API documentation
2017-01-15 00:58:49 +01:00
Max Kellermann
e847ddf011
DetachedSong: compare start_time and end_time in IsSame()
...
This method is used by DecoderControl::IsCurrentSong(), which is used
by the player thread to check whether the current decoder instance can
be reused to seek. When switching to another song in the same CUE
sheet, previously DetachedSong::IsSame() returned true, and thus the
old decoder instance was used for the new song, not considering the
new end_time. This led to the old decoder quickly quitting.
2017-01-15 00:54:25 +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
Steven O'Brien
791efc171a
input/alsa: enable non-blocking mode
2017-01-14 20:59:57 +01:00
Steven O'Brien
144312a525
input/alsa: handle EAGAIN
2017-01-14 20:59:23 +01:00
Max Kellermann
92684112ed
input/alsa: call snd_pcm_start() after snd_pcm_prepare()
...
This is necessary because we'll never get woken up again by
epoll_wait() after a buffer overrun recovery, unless we start the PCM
explicitly before returning to the I/O loop.
2017-01-14 20:58:30 +01:00
Max Kellermann
ef114ee6cb
input/alsa: improve logging in Recover()
...
Copy yet more code from the ALSA output plugin.
2017-01-14 20:52:41 +01:00
Max Kellermann
667f209742
input/alsa: check snd_pcm_state() in Recover()
...
Copy some good code from the ALSA output plugin.
2017-01-14 20:51:51 +01:00
Max Kellermann
4ad0747c78
output/alsa: explicitly mention all snd_pcm_state() enums
...
I want a compiler warning when a new state needs to be considered
here.
2017-01-14 20:49:15 +01:00
Max Kellermann
c5cf66402c
input/alsa: make two attributes "const"
2017-01-13 20:26:36 +01:00
Max Kellermann
05417049eb
input/alsa: clear sockets from within IOThread
...
Fixes assertion failure in implicit destructor.
2017-01-13 20:17:16 +01:00
Max Kellermann
c7b0c46d9f
output/recorder: fix typo in variable name
...
Fixes the dreaded error "Failed to create : No such file or
directory".
https://bugs.musicpd.org/view.php?id=4625
2017-01-12 21:36:32 +01:00
Max Kellermann
df578c91ad
output/alsa: log DoP mode
2017-01-11 22:50:40 +01:00
Max Kellermann
70008c47c9
output/alsa: support DSD_U16
2017-01-11 22:47:21 +01:00
Max Kellermann
938affef32
pcm/export: support DSD_U16
2017-01-11 22:47:12 +01:00
Max Kellermann
a3c33000ee
pcm/Dsd32: include cleanup
2017-01-11 22:47:12 +01:00
Max Kellermann
cc0dbcf3f4
pcm/Dsd32: fix the byte order
...
The byte order of DSD_U32 was wrong from the start. The oldest bits
must be in the MSB, not in the LSB, according to
snd_pcm_format_descriptions in alsa-lib.
2017-01-11 22:25:54 +01:00
Max Kellermann
c5a2cadccc
pcm/Export: convert to class, make members private
2017-01-11 21:48:43 +01:00
Max Kellermann
9aa43416b6
pcm/dop: remove unnecessary assertions
2017-01-11 21:48:43 +01:00
Max Kellermann
8364029db8
output/alsa: move code to PlayRaw()
2017-01-11 21:38:05 +01:00
Max Kellermann
d842d21be0
util/ReusableArray: add method GetCapacity()
2017-01-11 20:37:12 +01:00
Max Kellermann
3514fd2433
util/ReusableArray: add move constructor/operator
2017-01-11 20:37:12 +01:00
Max Kellermann
6778ff27ea
util/ReusableArray: use C++11 initializers
2017-01-11 20:33:01 +01:00
Max Kellermann
f32315d699
pcm/Export: remove obsolete gcc warning suppression
2017-01-11 20:31:48 +01:00
Max Kellermann
8b754b24b6
pcm/Buffer: update API documentation
2017-01-11 20:24:32 +01:00
Max Kellermann
78a73eac53
pcm/Export: add (dummy) method Cancel()
...
We'll have some code for it soon.
2017-01-11 15:41:28 +01:00
Max Kellermann
533cb99c33
output/Source: reset all filters in Cancel()
2017-01-11 15:39:18 +01:00
Max Kellermann
79726940dc
output/Source: un-inline Cancel()
2017-01-11 15:39:00 +01:00
Max Kellermann
27c7891169
filter/Internal: add method Reset()
2017-01-11 15:34:25 +01:00
Max Kellermann
7a3a793a12
decoder/Bridge: call PcmConvert::Reset() after seeking
2017-01-11 15:32:57 +01:00
Max Kellermann
8088469eca
pcm/Convert: add method Reset()
2017-01-11 15:30:30 +01:00
Max Kellermann
3dcb082015
pcm/Resampler: add method Reset()
...
Hook for src_reset(), not yet used.
2017-01-11 15:26:48 +01:00
Max Kellermann
bece023028
pcm/PcmDsd: move Dsd8To32() to Dsd32.cxx
2017-01-11 15:22:43 +01:00
Max Kellermann
9c4df66925
pcm/Export: halve the sample rate for DoP
...
Move this sample rate fixup from the ALSA output plugin to PcmExport,
where it belongs.
2017-01-11 10:33:23 +01:00
Max Kellermann
2b43ceb6c6
pcm/Export: DSD_U32 quarters the sample rate
...
DSD_U32 packs four bytes instead of one large "sample", thus the
sample rate is one quarter of the input sample rate. This fixes a
rather critical DSD_U32 playback problem.
2017-01-11 10:14:41 +01:00
Max Kellermann
c143adba91
pcm/Export: add CalcOutputSampleRate(), CalcInputSampleRate()
...
Prepare for DSD sample rate fixups.
2017-01-10 23:48:26 +01:00
Max Kellermann
142fdc8d86
decoder/flac: add options "probesize" and "analyzeduration"
...
https://bugs.musicpd.org/view.php?id=3876
2017-01-10 23:05:04 +01:00
Max Kellermann
c3fc84de12
input/curl: wake up client thread after seek to end of file
...
Call SeekDone() to avoid the freeze bug.
2017-01-09 18:08:33 +01:00
Max Kellermann
c82b03a74c
decoder/wavpack: fix crash bug
2017-01-08 14:54:12 +01:00
Max Kellermann
58fb36bdb9
storage/http: new storage plugin
2017-01-08 14:40:20 +01:00
Max Kellermann
4297a7b0a4
lib/curl/Request: move exception handling out of the WRITEFUNCTION
...
libcurl's WRITEFUNCTION is pretty fragile; if we destroy the CURL*
instance or even unregister it using curl_multi_remove_handle(),
libcurl will crash instantly. But still we need to be able to handle
exceptions from inside the WRITEFUNCTION, and call
CurlResponseHandler::OnError(), which may destroy the whole thing. As
a workaround, I use DeferredMonitor to postpone the OnError() call
into a stack frame which is allowed to destroy the request.
2017-01-08 14:36:27 +01:00
Max Kellermann
1bab6d0dd7
lib/curl/Request: move catch clause out of FinishHeaders
...
Let the caller decide what to do with the exception.
2017-01-08 14:36:27 +01:00
Max Kellermann
13b85edbe2
lib/curl/Request: postpone the curl_easy_cleanup() call
...
When the request is done, only unregister the CURL* handle, but do not
delete it yet - it may still be needed for CURLINFO_RESPONSE_CODE.
2017-01-08 13:51:53 +01:00
Max Kellermann
dc53098e43
lib/curl/Request: allow Stop() to be called twice
...
Convert assertion to runtime check. This is useful because this is a
public method, and the caller has no chance to check if the object is
still registered.
2017-01-08 13:51:53 +01:00
Max Kellermann
3c66feff5a
lib/curl/Global: defer the ReadInfo() call
...
Fixes a crash that can occur due to recursion from InvalidateSockets()
to ReadInfo() to CurlRequest callbacks.
2017-01-08 12:46:35 +01:00
Max Kellermann
218c3bc0d5
lib/curl/Multi: fix typo
2017-01-08 12:46:35 +01:00
Max Kellermann
9f5eddcd13
lib/curl/Global: move code to UpdateTimeout()
2017-01-08 12:44:07 +01:00
Max Kellermann
3cba76552b
lib/curl/Global: drop redundant ">=0" check
2017-01-08 12:44:04 +01:00
Max Kellermann
e98a8b624b
lib/curl/Global: drop redundant "virtual"
2017-01-08 12:41:26 +01:00
Max Kellermann
6c6947b01f
util/UriUtil: add uri_get_path()
2017-01-08 11:05:58 +01:00
Max Kellermann
44493ca0c4
util/TimeParser: add "pure" attribute
2017-01-08 10:41:08 +01:00
Max Kellermann
42acf78b09
util/TimeParser: wrapper for strptime()
...
Move code from SongFilter.cxx.
2017-01-07 22:11:45 +01:00
TermeHansen
3aa9f8af18
Rewrite of AlsaMixerPlugin to use volume_mapping
...
Changed AlsaMixerPlugin to use the get and set normalized functions from volume_mapping of alsa-utils/alsamixer
Changed volume_mapping set volume to be for all channels and not per channel
added volume_mapping files to Makefile.am
2017-01-07 16:30:19 +01:00
TermeHansen
8a32ee30a5
Adding volume_mapping from alsa-utils/alsamixer
...
source:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob_plain;f=alsamixer/volume_mapping.c;hb=HEAD
http://git.alsa-project.org/?p=alsa-utils.git;a=blob_plain;f=alsamixer/volume_mapping.h;hb=HEAD
2017-01-07 16:26:36 +01:00
Max Kellermann
981dc0626b
lib/expat/ExpatParser: add constructor overload for XML_ParserCreateNS()
2017-01-07 16:17:53 +01:00
Max Kellermann
8986d14e98
lib/expat/ExpatParser: make constructors "explicit"
2017-01-07 16:15:11 +01:00
Max Kellermann
5163b1a624
lib/curl/Request: require the caller to explicitly register the request
...
This allows constructing an instance in any thread, and register it
inside the IOThread later.
2017-01-07 16:01:58 +01:00
Max Kellermann
860aa9d6d0
lib/expat/ExpatParser: move InputStream overload to separate source file
...
Eliminate one unnecessary dependency for debug programs which don't
need the InputStream API.
2017-01-07 15:46:36 +01:00
Max Kellermann
6cff3214f3
lib/curl/Slist: new wrapper for curl_slist
2017-01-06 19:37:31 +01:00
Max Kellermann
fd910bd5e9
db/upnp: use "override" instead of "virtual"
2017-01-06 19:35:58 +01:00
Max Kellermann
c6086bed41
filter/Internal: remove the default constructor
...
Not used. Force implementations to initialize out_audio_format.
2017-01-06 12:45:52 +01:00
Max Kellermann
1a9dfdfab8
filter/AutoConvert: initialize Filter::out_audio_format
2017-01-06 12:44:55 +01:00
Max Kellermann
5284cd11a9
filter/AutoConvert: remove obsolete NULL check
2017-01-06 12:35:06 +01:00
Max Kellermann
d1a47cffad
filter/convert: remove obsolete method prototype
2017-01-06 12:34:39 +01:00
Max Kellermann
f469595eee
filter/Internal: remove obsolete doxygen line
2017-01-06 12:34:39 +01:00
Max Kellermann
9cfc52f114
filter/Internal: add assertion to constructor
2017-01-06 11:17:55 +01:00
Max Kellermann
8aae9766e5
fs/io/*: make constructors "explicit"
2017-01-04 10:41:04 +01:00
Max Kellermann
288b98ccbf
fs/io/GunzipReader: use C++11 initializer
2017-01-04 10:37:34 +01:00
Max Kellermann
bde50b1be8
fs/io/{GunzipReader,GzipOutputStream: remove deprepcated dynamic exception specifications
2017-01-04 10:33:24 +01:00
Max Kellermann
a34dfd55be
util/HugeAllocator: remove deprepcated dynamic exception specifications
2017-01-04 10:32:21 +01:00
Eugene Baklanov
bd14afe347
Fix for priority order bug if reordering in SetRandom()
...
Fix for the problem where order with priorities gets out of whack in case it's
reordered by SetRandom() while another song is currently playing.
What happens is, if some song is already playing and you have set some
priorities before switching on the random mode, and then turn the mode on, the
original code swaps position of the first song in the order (i.e., the highest
priority song) with current, so that current is 0 (which it should be). The
problem is, the "original" first song then goes to the place "current" song was
after reordering, wherever that is, instead of going after the "current" song.
This patch fixes the issue.
Also the fix makes MoveOrder() public, because why shouldn't it be, anyway. It
certainly makes more sense than just having SwapOrders() public for some
reason.
Signed-off-by: Eugene Baklanov <miltenfiremage@gmail.com>
2017-01-04 10:10:27 +01:00
Max Kellermann
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
39fd713b91
Main: invoke UpdateEffectiveReplayGainMode() after output init
...
Forward the configured ReplayGainMode to all outputs and decoders.
2017-01-03 13:44:38 +01:00
Max Kellermann
31d77ec580
input/curl, ...: use strncmp() instead of memcmp() to avoid crash
2017-01-03 13:17:02 +01:00
Max Kellermann
06116382ee
input/curl: move code to class CurlRequest
...
The CurlRequest gives us a more low-level API to CURL without the
InputStream interface, integrated into our IOThread.
2017-01-03 12:24:05 +01:00
Max Kellermann
4397fe3a13
input/curl: fold input_curl_easy_add_indirect() into the only caller
2017-01-03 10:53:20 +01:00
Max Kellermann
534e1fa6eb
input/curl: move code to SeekInternal(), simplify DoSeek()
...
Simplifies the code and reduces the number of IOThread roundtrips.
2017-01-03 10:50:02 +01:00
Max Kellermann
3e8cc2c670
input/curl: move class CurlGlobal to separate source file
2017-01-03 10:50:02 +01:00
Max Kellermann
3c565baf9d
output/Source: clear current_chunk in Close()
...
Fixes assert failure after unpausing.
2017-01-03 10:50:02 +01:00
Max Kellermann
2e182e84c3
thread/Mutex: remove ScopeLock, use std::lock_guard directly
2017-01-03 07:11:57 +01:00
Max Kellermann
a42021655c
thread/Cond: make the integer-based timed_wait() overload private
...
Make sure this deprecated API is not used.
2017-01-03 07:07:10 +01:00
Max Kellermann
2498a2b0bd
thread/Mutex: use std::lock_guard instead of std::unique_lock
...
We need purely RAII-style, and this is std::lock_guard.
2017-01-03 06:56:24 +01:00
Max Kellermann
4484411a77
output/Internal: add various trivial getter methods
2016-12-29 23:28:54 +01:00
Max Kellermann
61a151c803
output/State: add missing mutex lock
2016-12-29 23:28:46 +01:00
Max Kellermann
5149c950aa
output/Multiple: add missing mutex lock
2016-12-29 23:28:46 +01:00
Max Kellermann
18f4d846c9
output/Internal: make the Mutex mutable
2016-12-29 23:28:37 +01:00
Max Kellermann
db95aa250d
output/Control: pass "force" flag to LockUpdate()
...
Reduce overhead by eliminating MultipleOutputs::ResetReopen().
2016-12-29 23:20:26 +01:00
Max Kellermann
982d1bf662
output/Init: convert audio_output_setup() to method
2016-12-29 22:59:03 +01:00
Max Kellermann
52652cb609
command/{Player,Error}: extract messages from nested exceptions
2016-12-29 14:46:13 +01:00
Max Kellermann
256f40d4f5
output/Multiple: obtain detailed error information in Open()
2016-12-29 14:46:13 +01:00
Max Kellermann
ef9acc54ec
output/Internal: remember the most recent error
2016-12-29 14:21:12 +01:00
Max Kellermann
a9f2d25957
output/Thread: unify exception handling
2016-12-29 14:10:37 +01:00
Max Kellermann
6fc47fbb69
thread/Mutex: make ScopeLock an alias for std::unique_lock
2016-12-29 11:53:24 +01:00
Max Kellermann
9c11184238
thread/Mutex: use std::unique_lock to implement ScopeLock
2016-12-29 11:51:25 +01:00
Max Kellermann
a421c1dbfb
notify: use C++11 initializer
2016-12-29 11:41:22 +01:00
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