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
Max Kellermann
12ecfdd423
output/Thread: convert pointer to reference
2016-12-20 17:35:38 +01:00
Max Kellermann
67cfbfc2f3
output/SharedPipeConsumer: update API documentation
2016-12-20 16:35:14 +01:00
Max Kellermann
fc83d38e67
input/curl: wrap CURLM* in new class CurlMulti
2016-12-19 16:41:12 +01:00
Max Kellermann
7063c423eb
input/curl: rename class CurlMulti to CurlGlobal
2016-12-19 16:37:01 +01:00
Max Kellermann
36b93993cf
input/curl: wrap CURL* in new class CurlEasy
2016-12-19 14:42:04 +01:00
Max Kellermann
ceffc5aa72
input/curl: remove duplicate InitEasy() call
2016-12-19 14:38:50 +01:00
Max Kellermann
ccb45b6f6e
output/Client: new interface to replace direct access to class PlayerControl
2016-12-14 20:29:15 +01:00
Max Kellermann
d2e47e014a
player/Thread: reduce unlock/lock overhead in PlayerCommand::PAUSE handler
2016-12-14 20:24:52 +01:00
Max Kellermann
a5b8d7917f
player/Thread: mutex must be locked inside OpenOutput()
2016-12-14 20:23:23 +01:00
Max Kellermann
d0e735ee4b
player/Thread: mutex must be locked inside CheckDecoderStartup()
2016-12-14 20:13:18 +01:00
Max Kellermann
ece5971027
output/Multiple: move Wait() to struct PlayerControl
...
Eliminate a dependency from MultipleOutputs on PlayerControl.
2016-12-14 19:37:01 +01:00
Max Kellermann
7c6b0d5c31
player/Thread: use class ScopeLock
2016-12-14 13:10:48 +01:00
Max Kellermann
03151310cf
player/Control: add method LockApplyBorderPause()
2016-12-14 13:09:48 +01:00
Max Kellermann
baa2bc0c38
player/Control: add method LockSetOutputError()
2016-12-14 13:01:17 +01:00
Max Kellermann
7e1b53480e
output/MultipleOutputs: parallelize EnableDisable()
2016-12-14 08:41:42 +01:00
Max Kellermann
6425b4f9f5
output/MultipleOutputs: parallelize AudioOutput destruction
...
Reduce latency by stopping all AudioOutputs asynchronously.
2016-12-14 08:35:07 +01:00
Max Kellermann
fb907f5f76
output/Thread: KILL implicitly closes and disables the AudioOutput
...
Reduce shutdown latency by two commands per output.
2016-12-14 08:29:09 +01:00
Max Kellermann
b107a1583f
output/MultipleOutputs: move code to AudioOutput::EnableDisableWait()
2016-12-14 08:00:43 +01:00
Max Kellermann
ced3f320eb
output/MultipleOutputs: reduce lock/unlock calls in EnableDisable()
...
Use ScopeLock to manage the lock; don't unlock after obtaining the
"really_enabled" flag; keep the same lock during EnableWait() /
DisableWait().
2016-12-14 07:54:05 +01:00
Max Kellermann
a9d7293818
output/Thread: wake up the player thread periodically while playing
...
Without this, the pipe would run empty very often, which may result in
an xrun if the roundtrip to the PlayerThread and back takes too long.
By waking up the PlayerThread before the pipe runs empty, we make MPD
much more latency tolerant, which is a major optimization.
2016-12-13 22:39:49 +01:00
Max Kellermann
265ad4b96a
output/Thread: eliminate redundant nullptr check
2016-12-13 22:20:41 +01:00
Max Kellermann
92eeb4969f
output/Thread: don't wake up the player after receiving command in Play()
...
If we have a pending command, then the player thread is already awake.
Even if not, we'll wake it up as soon as we have finished the command.
2016-12-13 22:17:06 +01:00
Max Kellermann
6fcddaf8fa
output/Thread: use AtScopeExit() to revert the in_playback_loop flag
2016-12-13 22:15:52 +01:00
Max Kellermann
41fd583fbc
output/Thread: eliminate one ScopeLock
2016-12-13 21:57:03 +01:00
Max Kellermann
ceba6816de
output/Thread: split Open()
...
Simplify the code, eliminate duplicate rollback code and eliminate the
"goto" kludge.
2016-12-13 21:46:27 +01:00
Max Kellermann
093cb475bb
output/Thread: simplify the retry_audio_format declaration
2016-12-13 21:34:43 +01:00
Max Kellermann
d44790b35f
output/Thread: reduce locking further in Open()
2016-12-13 21:26:28 +01:00
Max Kellermann
f8164a3dd1
output/Thread: unlock mutex during OpenFilter()
2016-12-13 21:24:14 +01:00
Max Kellermann
c20126598f
output/Thread: remove unused variable
2016-12-13 21:24:05 +01:00
Max Kellermann
6c818bb37a
AudioFormat: add method WithMask(), shortcut for ApplyMask()
2016-12-13 20:57:46 +01:00
Max Kellermann
df91f3738a
output/Thread: remove a useless out_audio_format setting
...
Now that I can see the Reopen() method clearly, it is obvious that the
out_audio_format setting will get overwritten by the following Open()
call.
2016-12-13 20:43:29 +01:00
Max Kellermann
b5b268f606
output/Thread: remove another redundant "open" check
2016-12-13 20:41:54 +01:00
Max Kellermann
ce6b8c94a2
output/Thread: convert redundant runtime check to assertion
2016-12-13 20:29:16 +01:00
Max Kellermann
6e643fe58b
output/Thread: don't deinitialize the pipe in Close()
2016-12-13 20:28:19 +01:00
Max Kellermann
2bf91a0487
output/Internal: merge REOPEN and OPEN
2016-12-13 20:07:00 +01:00
Max Kellermann
2775d747ac
output/Thread: move MusicPipe code to class SharedPipeConsumer
2016-12-13 16:33:23 +01:00
Max Kellermann
99659e4cf9
release v0.19.21
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlhPxTwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEoR8EACnEBj1zPTiraIoDZi9ZyqvwHZWILdcHRID
8XdUWmgIAwbL83Fwzxfokl060TWa43DWTWtGvieWkMcaAaTYNf8wxH6KZFmEVPCe
cvveFM6/PXJuEED16QjGoII9OzlIH330C4mmcmsfLPrcbAfULx7OtF7neIfbgpPX
ZKgrO6HVbpsMH57+o1CnX6sZXHwW9EvUy0j4YRuSfGX/7pgItfBrypDqPJCv2Hy1
mDy6gKWr7psA5ZiwYfTWVU1SPBuJiaKEM2jU80A5XVN0eZOi1EtUeySpyQO8Uncu
hnJApi9Pd6IT9Tb4Wz7LshmqHCjG82KC+EppI4ESrqE3R/OEsho1iPFej4SdJycV
XIcIRJ/S2JeopgGo4k/vlVzf4Y/9CMZZ7nP4fG1/1yjIYFQbefJeo1Gp/8b5ZTRD
5PjFgNGFyClwXNsHesF/2wDlCs1/DTv51BnapVLKD6AO9uyAOrzxBSeg8qSuprXx
K5m/z2dMdUNjBDzrSBzxKtVBwPfuARuo4Q633AxBk5C+HRpSdirtgrDBgE2aTDfU
4o+BjrhiL60t1C5iQJ48ahzCIRkEfe0czmfeNxu5Jiig8Y9cYtkYJezniyBIGkbL
RpqPxnD0YFTzzvuP8dWP+3zarxelETDwnH8KxD5jLpy2Rf2qjoNbeJNd70N6e8nN
z7Hnvp4YwQ==
=qsCR
-----END PGP SIGNATURE-----
Merge tag 'v0.19.21'
release v0.19.21
2016-12-13 11:00:39 +01:00
Max Kellermann
7146f825b2
decoder/ffmpeg: fix double free bug
...
From the avformat_open_input() API documentation:
"Note that a user-supplied AVFormatContext will be freed on failure."
https://bugs.musicpd.org/view.php?id=4607
2016-12-13 08:34:05 +01:00
Max Kellermann
dc05dd7ca1
output/Multiple: make chunk_is_consumed_in() an AudioOutput method
2016-12-11 21:59:28 +01:00
Max Kellermann
57dd344f3b
decoder/wavpack: implement WavpackStreamReader64 if available
2016-12-10 00:24:54 +01:00
Max Kellermann
f7f59df8aa
decoder/wavpack: move code to WavpackInput methods
2016-12-10 00:17:46 +01:00
Max Kellermann
0525a6f90f
decoder/wavpack: use WavpackSeekSample64() if available
2016-12-10 00:12:47 +01:00
Max Kellermann
7b4305d81b
decoder/wavpack: seek errors are fatal
...
The libWavPack documentation says:
"After a FALSE return the file should not be accessed again (other
than to close it); this is a fatal error."
2016-12-10 00:11:29 +01:00
Max Kellermann
94e9e93fa4
ReplayGainGlobal: move replay_gain_config into struct Config
...
Yet another global variable removed.
2016-12-10 00:03:29 +01:00
Max Kellermann
d2a1294e9a
Main: add struct Config, empty currently
2016-12-10 00:00:50 +01:00
Max Kellermann
30bd190b41
decoder/wavpack: implement scan_stream()
2016-12-09 23:23:35 +01:00
Max Kellermann
cf93cd9307
decoder/wavpack: convert WavpackInput::client to pointer
2016-12-09 23:23:02 +01:00
Max Kellermann
f40816e063
decoder/wavpack: add WavpackOpen() wrappers which throw exception
2016-12-09 23:15:40 +01:00
Max Kellermann
3759f29852
decoder/wavpack: move wavpack_scan_file() down
2016-12-09 23:15:06 +01:00
Max Kellermann
bc5555933f
decoder/wavpack: support native DSD
2016-12-09 23:08:54 +01:00
Max Kellermann
ead7ae8504
decoder/wavpack: use template for format_sample_X()
2016-12-09 22:53:01 +01:00
Max Kellermann
ad5abba8c6
decoder/wavpack: move 8 and 16 bit conversion to separate functions
2016-12-09 22:49:07 +01:00
Max Kellermann
61296cedd2
decoder/wavpack: rename format_samples_float() to format_samples_nop()
2016-12-09 22:47:32 +01:00
Max Kellermann
d9c29a2c4f
decoder/wavpack: use std::copy_n()
2016-12-09 22:23:19 +01:00
Max Kellermann
f5172e6b84
decoder/wavpack: use int16_t instead of uint16_t
...
Technically, these samples are signed. There was no practical
difference, only the declaration was formally wrong.
2016-12-09 22:21:31 +01:00
Max Kellermann
544bcbe903
decoder/wavpack: use WavpackGetNumSamples64() if available
2016-12-09 22:09:32 +01:00
Max Kellermann
f35dab1b56
decoder/wavpack: check WavpackGetNumSamples()==-1
2016-12-09 21:46:29 +01:00
Max Kellermann
caee420087
decoder/wavpack: move code to GetDuration()
2016-12-09 21:45:22 +01:00
Max Kellermann
e8c374113e
decoder/wavpack: make is_float const
2016-12-09 21:30:31 +01:00
Max Kellermann
98a241a730
decoder/wavpack: use WavpackGetReducedChannels()
...
Since we don't use OPEN_2CH_MAX, this should be equal to
WavpackGetNumChannels() - but who knows, maybe a future libWavPack
version breaks this assumption.
2016-12-09 21:23:38 +01:00
Max Kellermann
be8297d6f6
decoder/wavpack: basic DSD support (WavPack 5)
...
Enable OPEN_DSD_AS_PCM if available. No OPEN_DSD_NATIVE yet.
https://bugs.musicpd.org/view.php?id=4606
2016-12-09 21:03:47 +01:00
Max Kellermann
09da80e9f4
tag/ApeTag: don't export ape_tags[]
2016-12-09 20:59:07 +01:00
Max Kellermann
df4ecf63a8
decoder/wavpack: disable OPEN_TAGS
...
Use MPD's internal APE tag code, which works just as well. This
removes some duplicate code for reading tags and ReplayGain.
2016-12-09 20:53:54 +01:00
Max Kellermann
b4d1937857
decoder/wavpack: change norm_offset to 0
...
MPD uses a floating point range from -1 to +1 internally - why ask
libwavpack to use -32768..+32768 only to reduce it back to -1..+1
afterwards?
2016-12-09 20:53:45 +01:00
Max Kellermann
0be5fbdc35
decoder/wavpack: use AtScopeExit()
2016-12-09 20:53:04 +01:00
Max Kellermann
ae7e25ea65
release v0.19.20
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlhLAzUQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEp8ED/92V7el1LsuifbIKP4xFmHfENxB5bzBCQHZ
f4DlGybr7pA4FZQIR5Z0qulvVr+sdY0Y8hgSoOCKzmHGuOgQ6zxHVGVMWLY5N0JN
ExOrSGUhIjNV+L06LA/YDOE4Z9VUuSi6ZLx1KSLvFbYWULmoqoQREo001YyrfmYr
pSq+MosGX7i/lFEOrOzw1keEnOUIlqoEJ8IpPks+Xtkk8159TJS2z2FsgWBnlG5W
qO/N/Nn+TBZZjsDkOoJcdsQ6ot1ThJgxMWY+fduNP5Fe8s2oCHc8dAdYMyfhQiky
0xq139T8tLRRJUkv9inK63Zd0sn06/pemDD+XZGNE6arwvTsqriEwPcJHgsJYfaQ
wqGWv+DrMTGVSZnH+XUACLpUexmd8M6q1MZ3g12tRjQHNM06Yn6PePdHUm4IuclJ
eGsXEb1+jgr6/tMxYkmjUIs8SacpTK2ZUx4aYIG7+tVNmfGompK1gYlYT86ZVEEh
byzy7A67C9BpSkuC/4YzXT/oHBpDf7T4WVz1TEKZT3vke6l0CDTwYCQyBcG0NFCe
Pic45q4RgLbkH6NR4bJ1oX/XRCgh8V2QkLKdgcpzS4Lv+TE2hHRlBf9a7SVufIPT
yBNlY91nT8zUfws/7LBwfZtYQB7VcudUMlmSigtlrvr9CvpRCuGCCY5vdLxi4LYz
3lm6wOrp5g==
=opJg
-----END PGP SIGNATURE-----
Merge tag 'v0.19.20'
release v0.19.20
2016-12-09 20:18:54 +01:00
Max Kellermann
e7353ec7e7
Queue: "setprio" re-enqueues old song if priority has been raised
...
This commit changes a minor queue priority design to something which
makes a little bit more sense.
Previously, a song that had already been played would only be
re-enqueued if its priority had just been raised above the current
song's. This means that if it was already above, it was not
re-enqueued. That is a surprising behavior, because users expect a
song to be played when its priority is raised.
Now the song is always re-enqueued if its priority is raised (and
above the current song's - no matter if it has already been above
before).
https://bugs.musicpd.org/view.php?id=4592
2016-12-09 13:02:26 +01:00
Max Kellermann
5013de6770
LogInit: convert use_stdout flag to out_fd=STDOUT_FILENO
2016-12-04 20:15:45 +01:00
Max Kellermann
301abac0c1
LogInit: initialize out_fd properly to avoid closing stdin
2016-12-04 20:13:37 +01:00
Max Kellermann
9614c48e4c
LogInit: throw exception instead of calling FatalError()
2016-12-04 20:07:41 +01:00
Max Kellermann
c6e1ca1c22
system/Error: use std::generic_category() for errno on Windows
...
It's wrong to use std::system_category() for both GetLastError() and
errno on Windows. Apparently, everybody uses std::generic_category()
for errno values, which appears to be a safe choice.
Some discussion on this confusing topic can be found here:
https://stackoverflow.com/questions/28746372/system-error-categories-and-standard-system-error-codes
2016-12-04 20:07:11 +01:00
Max Kellermann
30dc473697
system/Error: allow using errno functions on Windows
...
The Windows standard library emulates part of POSIX, which includes
errno.
2016-12-04 20:07:09 +01:00
Max Kellermann
65974ceabc
PlaylistFile: remove redundant existence check
2016-12-04 20:04:16 +01:00
Max Kellermann
6caf53d1c2
fs/FileSystem: RenameFile() throws exception on error
2016-12-04 19:59:33 +01:00
Max Kellermann
dee6e498d9
fs/CheckFile: use IsAccessDenied()
2016-12-04 19:56:25 +01:00
Max Kellermann
b3723274f7
decoder/Bridge: move code to DecoderControl::SetReady()
2016-12-03 14:20:51 +01:00
Max Kellermann
9fb7cc796b
decoder/Control: add attribute configured_audio_format
...
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00
Max Kellermann
3472208c05
ReplayGainGlobal: move replay_gain_mode to struct Partition
2016-12-03 13:56:25 +01:00
Max Kellermann
fc30e1d559
Partition: pass ReplayGainConfig to constructor
2016-12-03 13:55:14 +01:00
Max Kellermann
cd4bb444ff
player/Control: make ReplayGainConfig const
2016-12-03 13:47:13 +01:00
Max Kellermann
e443513996
Main: call replay_gain_global_init() before forking
2016-12-03 13:27:59 +01:00
Max Kellermann
3d16f22135
player/Control: use C++11 initializers
2016-12-03 13:08:00 +01:00
Max Kellermann
6cc1ff5eeb
decoder/Control: make ReplayGainConfig const
2016-12-03 13:05:25 +01:00
Max Kellermann
3000b9dcde
filter/ReplayGain: add ReplayGainConfig copy
...
Remove dependency on ReplayGain global variables.
2016-12-03 12:51:02 +01:00
Max Kellermann
3b867462a3
filter/ReplayGain: remove FilterPlugin instance, add explicit constructor
2016-12-03 12:34:23 +01:00
Max Kellermann
b8aa9348b9
filter/Registry: make filter_plugins static
2016-12-03 12:24:30 +01:00
Max Kellermann
513e3a3d21
filter/ReplayGain: forward-declare struct ReplayGainInfo
2016-12-03 12:20:32 +01:00
Max Kellermann
bfb0897b54
filter/ReplayGain: convert pointers to references
2016-12-03 12:13:45 +01:00
Max Kellermann
86e8b8c10d
decoder/Thread: skip the ReplayGain loader if the feature is disabled
...
https://bugs.musicpd.org/view.php?id=4595
2016-11-25 13:26:40 +01:00
Max Kellermann
ee57c3490a
{decoder,player}/Control: add ReplayGain{Config,Mode} attributes
...
Don't use the global variables in class DecoderBridge; instead,
forward these values to the decoder thread via PlayerControl and
DecoderControl.
2016-11-25 12:51:55 +01:00
Max Kellermann
77c1f54876
ReplayGainConfig: add struct ReplayGainConfig, move globals to ReplayGainGlobal.cxx
2016-11-25 11:13:08 +01:00
Max Kellermann
dc5984d0e0
ReplayGainConfig: move code to ParsePreamp()
2016-11-24 17:45:27 +01:00
Max Kellermann
7afbd4800f
filter/ReplayGain: use ToString(ReplayGainMode)
2016-11-24 17:39:00 +01:00
Max Kellermann
0720702c91
ReplayGainMode: add ToString(), FromString()
...
Move code from ReplayGainConfig.cxx.
2016-11-24 17:34:57 +01:00
Max Kellermann
5f396e824f
ReplayGainMode: convert to strictly-typed enum
2016-11-24 17:34:57 +01:00
Max Kellermann
4f229c254c
ReplayGainInfo: move enum ReplayGainMode to separate header
2016-11-24 17:34:57 +01:00
Max Kellermann
25e58df5e0
ReplayGainInfo: don't use array in struct ReplayGainInfo
...
Declare two named elements. An enum should not be used as an array
index, as this is error prone.
2016-11-24 17:34:57 +01:00
Max Kellermann
1261327fa6
ReplayGainInfo: implement fallback in Get()
...
Eliminates Complete().
2016-11-24 17:34:57 +01:00
Max Kellermann
09c3cc58e4
ReplayGainInfo: add method Get()
2016-11-24 17:34:57 +01:00
Max Kellermann
7ef31f84a7
command/Error: translate std::invalid_argument to ACK_ERROR_ARG
2016-11-24 17:33:36 +01:00
Max Kellermann
0759d72108
Partition: add UpdateEffectiveReplayGainMode()
...
Move code from replay_gain_get_real_mode().
2016-11-24 15:18:57 +01:00
Max Kellermann
9b9144f25d
decoder/Control: use C++11 initializers
2016-11-24 14:58:17 +01:00
Max Kellermann
b677e891b4
decoder/{mikmod,modplug}: throw exception instead of calling FatalError()
2016-11-24 14:09:58 +01:00
Max Kellermann
509f62f68d
output/MultipleOutputs: throw exception instead of calling FatalError()
2016-11-24 14:04:40 +01:00
Max Kellermann
868bf752f3
MusicPipe: disallow copying
2016-11-23 18:06:15 +01:00
Max Kellermann
051cdc9670
MusicPipe: use C++11 initializers
2016-11-23 18:04:23 +01:00
Max Kellermann
4de5c216ff
MusicChunk: disallow copying
2016-11-23 17:57:29 +01:00
Max Kellermann
ad2c7304ea
MusicChunk: use C++11 initializers
2016-11-23 17:56:36 +01:00
Max Kellermann
4dd1309c3f
filter/Plugin: rename with CamelCase
2016-11-23 17:43:50 +01:00
Steven OBrien
541da2740d
db/simple: add missing "return"
...
SimpleDatabase::Visit() always throws exception when visiting a song.
Adding a song to the queue always results in a "No such directory"
error response, although the song is successfully added. This
behaviour was introduced by commit
3ff728ab02
. This patch fixes this.
https://bugs.musicpd.org/view.php?id=4601
2016-11-23 17:30:30 +01:00
Max Kellermann
95e2bec215
decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>
...
Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
2016-11-22 16:49:31 +01:00
Max Kellermann
72c96052b4
decoder/gme: move gme_container_scan() down
2016-11-22 16:49:30 +01:00
Max Kellermann
bf78b7f815
decoder/sidplay: use template to eliminate duplicate code
2016-11-22 13:17:31 +01:00
Max Kellermann
ffb9874d84
decoder/sidplay: move code to ScanSidTuneInfo()
2016-11-22 12:37:25 +01:00
Max Kellermann
228cdbe6af
decoder/gme: provide the TRACK tag
2016-11-22 12:20:31 +01:00
Max Kellermann
a303639c9e
decoder/{gme,sidplay}: fix off-by-one bug in container_scan()
...
Broken by commit 0abee77e62
2016-11-22 12:20:31 +01:00
Max Kellermann
c5133f6088
db/update/Container: catch C++ exceptions
2016-11-22 12:16:14 +01:00
Max Kellermann
27d368d48d
decoder/gme: use AtScopeExit()
2016-11-22 12:16:14 +01:00
Max Kellermann
085b599f84
decoder/gme: remove redundant extern declaration
2016-11-22 12:16:14 +01:00
Max Kellermann
3b84eb3b70
decoder/gme: add missing SUBTUNE_PREFIX
...
Got lost in 0abee77e62
2016-11-22 12:16:14 +01:00
Max Kellermann
aa877a29d7
decoder/Thread: repair container decoder support
...
Catch ENOTDIR exceptions and in that case, try all matching decoder
plugins which implement the "container_scan" method.
https://bugs.musicpd.org/view.php?id=4561
2016-11-22 10:24:08 +01:00
Max Kellermann
0abee77e62
decoder/DecoderPlugin: container_scan() returns forward_list<string>
2016-11-22 09:33:52 +01:00
Max Kellermann
114fcee2ae
decoder/Client: add virtual method Read()
2016-11-21 22:43:09 +01:00
Max Kellermann
b488204093
decoder/API: move DecoderBridge methods to Bridge.cxx
2016-11-21 22:14:09 +01:00
Max Kellermann
322bfbaf57
decoder/API: simplify the client==nullptr code path in decoder_read()
2016-11-21 22:13:03 +01:00
Max Kellermann
2718f4c333
decoder/API: move part of decoder_check_cancel_read() into class DecoderBridge
2016-11-21 22:07:03 +01:00
Max Kellermann
8c342a764b
decoder/API: move functions into class DecoderBridge
2016-11-21 21:44:57 +01:00
Max Kellermann
697c3f8cb9
decoder/Internal: rename struct Decoder to class DecoderBridge
2016-11-21 21:38:23 +01:00
Max Kellermann
723e54f74e
decoder/Client: add OpenUri(), replacing decoder_open_uri()
2016-11-18 12:34:04 +01:00
Max Kellermann
1a8c96a3f0
decoder/mpcdec: use AtScopeExit()
2016-11-18 12:22:41 +01:00
Max Kellermann
a88040e4d5
decoder/Client: add Submit methods
...
Replaces decoder_data() and others.
2016-11-18 09:05:04 +01:00
Max Kellermann
47a0f46ce8
decoder/Client: add DecoderCommand/seek virtual methods
2016-11-18 09:03:42 +01:00
Max Kellermann
66fb352cca
decoder/Client: add virtual method Ready()
...
Replaces decoder_initialized().
2016-11-18 09:03:41 +01:00
Max Kellermann
fd77acc217
decoder/Client: new interface which wraps struct Decoder
...
Prepare for a Decoder API redesign based on an abstract class with
virtual methods.
2016-11-18 09:03:39 +01:00
Max Kellermann
595d1942cb
decoder/Internal: rename "chunk" to "current_chunk"
2016-11-18 09:01:32 +01:00
Max Kellermann
219a756abc
Compiler.h: drop gcc_alignas(), use plain C++11 alignas()
2016-11-18 08:56:16 +01:00
Max Kellermann
2f76f9da89
configure.ac: enable C++14
2016-11-18 08:41:47 +01:00
Max Kellermann
b0b8f573bc
decoder/API: copy exceptions to Decoder::error
2016-11-17 22:54:13 +01:00
Max Kellermann
746aa6cc0f
decoder/API: check for errors in decoder_read()
2016-11-17 22:53:43 +01:00
Max Kellermann
fac610d47b
decoder/API: decoder_open_uri() can throw StopDecoder
2016-11-17 22:48:18 +01:00
Max Kellermann
93209da176
decoder/API: lock decoder in decoder_get_command()
2016-11-17 22:36:42 +01:00
Max Kellermann
35a2a48c47
Merge branch 'v0.19.x'
2016-11-17 22:20:24 +01:00
Max Kellermann
7019f6bea4
decoder/pcm: round buffer size down to nearest frame size
...
https://bugs.musicpd.org/view.php?id=4599
2016-11-17 21:58:27 +01:00
Max Kellermann
5c3e55b5b1
{input,output}/alsa: fix gcc 7.0 -Wimplicit-fallthrough
2016-11-16 19:50:38 +01:00
Max Kellermann
22dcca9832
util/Error: remove obsolete class
2016-11-10 12:58:26 +01:00
Max Kellermann
a17abc5557
Log: remove the obsolete class Error overloads
2016-11-10 12:55:08 +01:00
Max Kellermann
741c6f1179
command: remove the obsolete Error support code
2016-11-10 12:55:08 +01:00
Max Kellermann
43b285ef7a
decoder/Thread: remove the obsolete catch(Error&)
2016-11-10 12:55:08 +01:00
Max Kellermann
f4bb18b05e
fs/AllocatedPath: remove the obsolete class Error overload
2016-11-10 12:55:08 +01:00
Max Kellermann
14885f25b4
system/FatalError: remove the obsolete class Error overloads
2016-11-10 12:55:08 +01:00
Max Kellermann
4e16ea0f0a
decoder/flac: migrate from class Error to C++ exceptions
2016-11-10 12:55:08 +01:00
Max Kellermann
42a696873b
decoder/faad: migrate from class Error to C++ exceptions
2016-11-10 12:55:08 +01:00
Max Kellermann
cfd51db229
CheckAudioFormat: migrate from class Error to C++ exceptions
2016-11-10 12:55:08 +01:00
Max Kellermann
12f11c97ae
decoder/faad: use AtScopeExit()
2016-11-10 12:55:08 +01:00
Max Kellermann
6a78d11127
decoder/gme: use AtScopeExit()
2016-11-10 12:55:08 +01:00
Max Kellermann
256ee7a8c7
decoder/audiofile: use AtScopeExit()
2016-11-10 12:55:08 +01:00
Max Kellermann
07a51957ee
fs/FileInfo: remove the obsolete class Error overloads
2016-11-10 12:55:08 +01:00
Max Kellermann
37c4470f10
fs/CheckFile: use FileInfo(Path) instead of GetFileInfo()
2016-11-10 12:55:08 +01:00
Max Kellermann
4dc7d1c0cd
decoder/Thread: use AllocatedPath::FromUTF8Throw()
2016-11-10 12:55:08 +01:00
Dave Hocker
f6a85f0b0b
output/osx: fix build failure
2016-11-10 12:55:08 +01:00
Max Kellermann
5b8b660bd0
decoder/DecoderAPI: include cleanup
2016-11-09 13:42:52 +01:00
Max Kellermann
d9cb85df83
output/Plugin: remove 'Error&' parameters, use C++ exceptions only
2016-11-09 12:36:21 +01:00
Max Kellermann
445e82be75
output/Multiple: migrate from class Error to C++ exceptions
2016-11-09 12:31:23 +01:00
Max Kellermann
98a12c49dd
pcm/Domain: remove obsolete source
2016-11-09 12:15:35 +01:00
Max Kellermann
b78cc7e48a
output/Thread: remove obsolete pcm_domain check, this is defunct
2016-11-09 12:15:35 +01:00
Max Kellermann
ac9ce0b3ad
output/Init: migrate _setup() from class Error to C++ exceptions
2016-11-09 12:09:00 +01:00
Max Kellermann
cf2b814629
output/Init: migrate Configure() from class Error to C++ exceptions
2016-11-09 12:06:54 +01:00
Max Kellermann
bbe7a37359
output/Internal: hide Configure() and remove the non-configuring constructor
2016-11-09 12:06:06 +01:00
Max Kellermann
d0aa154ea6
output/null: migrate from class Error to C++ exceptions
2016-11-09 12:03:20 +01:00
Max Kellermann
df4616ae4a
output/osx: migrate from class Error to C++ exceptions
...
Beware, this commit was not tested. I don't have OS X, but I want to
prepare an API change.
2016-11-09 11:51:28 +01:00
Max Kellermann
10f62db9fd
output/osx: use std::unique_ptr
...
Eliminate all those "goto"s and make the function exception-safe.
2016-11-09 11:50:14 +01:00
Max Kellermann
5c075210d6
output/osx: use AtScopeExit() to call CFRelease()
2016-11-09 11:49:21 +01:00
Max Kellermann
0cf85b0771
output/haiku: eliminate DoClose()
2016-11-09 11:42:00 +01:00
Max Kellermann
fa90047e52
output/haiku: migrate from class Error to C++ exceptions
...
Beware, this commit was not tested. I don't have Haiku, but I want to
prepare an API change.
2016-11-09 11:39:11 +01:00
Max Kellermann
b9f64fe19b
output/haiku: embed "format" into the HaikuOutput class
...
Avoid one level of dynamic allocation.
2016-11-09 11:36:38 +01:00
Max Kellermann
dd072912e8
output/solaris: migrate from class Error to C++ exceptions
2016-11-09 11:18:19 +01:00
Max Kellermann
9dbdc75689
output/httpd: migrate from class Error to C++ exceptions
2016-11-09 08:40:10 +01:00
Max Kellermann
dce211dbba
output/sles: migrate from class Error to C++ exceptions
2016-11-09 08:35:35 +01:00
Max Kellermann
b4e5fa5c1b
output/roar: migrate from class Error to C++ exceptions
2016-11-09 08:29:44 +01:00
Max Kellermann
f12fa7e20a
output/shout: migrate from class Error to C++ exceptions
2016-11-08 15:40:19 +01:00
Max Kellermann
96f8f1da0c
output/OpenAL: migrate from class Error to C++ exceptions
2016-11-08 15:19:30 +01:00
Max Kellermann
db7eec042e
output/sndio: migrate from class Error to C++ exceptions
2016-11-08 15:15:16 +01:00
Max Kellermann
52aed3f8a1
output/jack: migrate from class Error to C++ exceptions
2016-11-08 15:11:21 +01:00
Max Kellermann
cadd186f1b
output/jack: use AtScopeExit()
2016-11-08 15:10:38 +01:00
Max Kellermann
dd9ab16d67
output/recorder: migrate from class Error to C++ exceptions
2016-11-07 09:48:10 +01:00
Max Kellermann
d8b6aff23a
encoder: migrate from class Error to C++ exceptions
2016-11-07 09:25:51 +01:00
Max Kellermann
b8aac3f8fc
output/Thread: catch and log send_tag() exceptions
2016-11-07 09:25:47 +01:00
Max Kellermann
4aab97ccb1
config/Path: throw std::runtime_error on error
2016-11-07 09:07:50 +01:00
Max Kellermann
4cd21f1e07
decoder/Control: throw exception on Seek() error
2016-11-07 09:05:28 +01:00
Max Kellermann
403f0f8c64
SongLoader, ...: include cleanup
2016-11-07 09:01:57 +01:00
Max Kellermann
8c4246f2ad
net/SocketError: remove obsolete Error functions
2016-11-07 08:58:26 +01:00
Max Kellermann
1859ba5ec8
output/winmm: 8 bit playback is not supported
...
Everything must be S16.
2016-11-07 08:53:57 +01:00
Max Kellermann
54d5184255
output/winmm: use std::array
2016-11-07 08:50:58 +01:00
Max Kellermann
0c5b986fc4
output/winmm: use range-based "for"
2016-11-07 08:28:41 +01:00
Max Kellermann
7b2cdd618e
output/winmm: use AudioOutputWrapper
2016-11-07 08:08:42 +01:00
Max Kellermann
30bb3f1fcb
output/winmm: migrate from class Error to C++ exceptions
2016-11-07 07:42:18 +01:00
Max Kellermann
b45ea66175
output/pipe: migrate from class Error to C++ exceptions
2016-11-05 15:24:10 +01:00
Max Kellermann
543c5034af
output/fifo: migrate from class Error to C++ exceptions
2016-11-05 15:13:14 +01:00
Max Kellermann
c8aa7afdc6
output/oss: migrate from class Error to C++ exceptions
2016-11-05 13:18:45 +01:00
Max Kellermann
b35bb1b50c
output/alsa: use C++ initializers
2016-11-04 11:31:23 +01:00
Max Kellermann
6341be9cdf
output/alsa: migrate from class Error to C++ exceptions
2016-11-04 11:31:23 +01:00
Max Kellermann
93a14a93f9
output/alsa: use Error::FormatPrefix()
2016-11-04 11:31:23 +01:00
Max Kellermann
d6559e2ac9
output/Thread: fix wrong error reference in catch clause
2016-11-04 11:31:23 +01:00
Max Kellermann
65e6755b8b
output/ao: migrate from class Error to C++ exceptions
2016-11-02 12:36:13 +01:00
Max Kellermann
6ead9750f4
output/pulse: migrate from class Error to C++ exceptions
2016-11-02 11:01:22 +01:00
Max Kellermann
6532c7e089
output/pulse: use C++11 initializers
2016-11-02 11:01:07 +01:00
Max Kellermann
8b3d934230
output/Thread: catch Pause() exceptions
2016-11-02 10:53:43 +01:00
Max Kellermann
e2b7c30811
event/BufferedSocket: pass std::exception_ptr to OnSocketError()
2016-11-02 10:38:05 +01:00
Max Kellermann
c8bb3c0b71
CommandLine: migrate from class Error to C++ exceptions
2016-11-02 10:30:46 +01:00
Max Kellermann
9990e8473c
LogInit: migrate from class Error to C++ exceptions
2016-11-02 10:11:17 +01:00
Max Kellermann
d765182bbb
config/Global: _get_path() throws exception on error
2016-11-02 10:07:57 +01:00
Max Kellermann
5a63d1d5a4
LogInit: use ConfigParam::GetPath()
2016-11-02 10:07:50 +01:00
Max Kellermann
6d409d27ca
lib/icu: migrate from class Error to C++ exceptions
2016-11-02 09:54:13 +01:00
Max Kellermann
e9c2885f34
lib/ffmpeg/Error: remove SetFfmpegError(); it's unused now
2016-10-31 13:18:47 +01:00
Max Kellermann
ecb8f7362b
decoder/ffmpeg: copy_interleave_frame() throws exception on error
2016-10-31 13:03:02 +01:00
Max Kellermann
17ccfec358
lib/expat/Parser: remove unused method SetError()
2016-10-29 11:06:28 +02:00
Max Kellermann
a55bb28069
decoder: include cleanup
2016-10-29 11:04:49 +02:00
Max Kellermann
a2e3dc0592
db/Interface: migrate Update() from class Error to C++ exceptions
2016-10-29 10:59:18 +02:00
Max Kellermann
df142d4f61
db/simple: migrate Mount() from class Error to C++ exceptions
2016-10-29 10:56:31 +02:00
Max Kellermann
fac8edd47a
db/Interface: migrate visitor methods from class Error to C++ exceptions
2016-10-29 10:42:56 +02:00
Max Kellermann
9a9da7b077
command/Database: use std::unique_ptr
2016-10-29 10:42:56 +02:00
Max Kellermann
131441846b
db/Error: remove unused variable db_domain
2016-10-29 10:42:56 +02:00
Max Kellermann
3ff728ab02
db/Visitor: remove the Error parameter
...
Implementations shall use exceptions instead.
2016-10-29 10:04:43 +02:00
Max Kellermann
78bf4ef5fa
db/Configured: migrate from class Error to C++ exceptions
2016-10-29 10:01:50 +02:00
Max Kellermann
318d0b3976
db/simple/Save: move log call to SimpleDatabase::Load()
2016-10-29 10:00:35 +02:00
Max Kellermann
90a14e14f4
db/simple/Save: migrate from class Error to C++ exceptions
2016-10-29 09:45:34 +02:00
Max Kellermann
dea46e8d5a
db/Plugin: migrate from class Error to C++ exceptions
2016-10-28 23:15:22 +02:00
Max Kellermann
7e5ce623fe
db/simple: throw C++ exception on init error
2016-10-28 23:13:18 +02:00
Max Kellermann
e17805f208
config/Block: GetPath() throws exception on error
2016-10-28 23:08:42 +02:00
Max Kellermann
d8bcdca55a
config/Block: rename GetBlockPath() to GetPath()
2016-10-28 23:07:26 +02:00
Max Kellermann
f6f2a3b366
output/alsa: throw C++ exception on init error
2016-10-28 22:56:27 +02:00
Max Kellermann
d52c7e7a1b
output/httpd: throw C++ exception on init error
2016-10-28 22:42:10 +02:00
Max Kellermann
c4acccac14
output/Init: add constructor overload which calls Configure()
2016-10-28 22:41:07 +02:00
Max Kellermann
13001c018c
AudioParser: throw exception on error
2016-10-28 22:36:04 +02:00
Max Kellermann
0c343cb1c3
encoder/Plugin: migrate from class Error to C++ exceptions
2016-10-28 21:29:01 +02:00
Max Kellermann
aead221184
event/ServerSocket: migrate from class Error to C++ exceptions
2016-10-28 21:22:25 +02:00
Max Kellermann
16d1c9f5d6
Main: catch exceptions in all of main()
2016-10-28 21:22:25 +02:00
Max Kellermann
0c464b24ad
OutputInit: allow "init" to throw exception
2016-10-28 21:11:52 +02:00
Max Kellermann
a249a630c0
OutputThread: support plugins throwing exceptions
2016-10-28 21:10:18 +02:00
Max Kellermann
f39823eac0
OutputThread: use class ScopeUnlock for exception-safety
2016-10-28 21:10:18 +02:00
Max Kellermann
69de99636f
OutputPlugin: update API documentation
2016-10-28 21:10:18 +02:00
Max Kellermann
afcff1fa77
lib/sqlite/Error: add missing include
...
https://bugs.musicpd.org/view.php?id=4593
2016-10-28 17:46:34 +02:00
Max Kellermann
9b5bae049c
config/Param: overload GetPath() throwing exception
2016-10-28 11:53:21 +02:00
Max Kellermann
7a3415166e
config/Param: add method GetPath()
...
Move code from config_parse_path().
2016-10-28 11:45:12 +02:00
Max Kellermann
5b2b4bf13c
config/Param: use CamelCase
2016-10-28 11:38:37 +02:00
Max Kellermann
4bd67bc298
db/update/InotifySource: migrate from class Error to C++ exceptions
2016-10-28 10:35:31 +02:00
Max Kellermann
1560749579
db/update/UpdateIO: include cleanup
2016-10-28 10:22:44 +02:00
Max Kellermann
ed68fd4ab3
queue/PlaylistUpdate: include cleanup
2016-10-27 22:19:26 +02:00
Max Kellermann
e9a9dabb49
tag/ApeLoader: include cleanup
2016-10-27 22:18:05 +02:00
Max Kellermann
31faafea9d
Client: remove the AllowFile() overload with Error parameter
...
Unused.
2016-10-27 22:16:05 +02:00
Max Kellermann
6961bd61ca
LocateUri: migrate from class Error to C++ exceptions
2016-10-27 22:04:41 +02:00
Max Kellermann
726fc53e62
Client: add AllowFile() overload which throws exception
2016-10-27 22:04:38 +02:00
Max Kellermann
c598686bd9
storage: migrate from class Error to C++ exceptions
2016-10-27 21:35:19 +02:00
Max Kellermann
cab87e9398
storage/FileInfo: make methods "constexpr"
2016-10-27 21:35:19 +02:00
Max Kellermann
680037927d
Merge branch 'v0.19.x'
2016-10-27 21:27:19 +02:00
Max Kellermann
ee026386e5
storage/Composite: avoid setting the error twice
...
If an error has already been set by f.directory->storage->GetInfo(),
don't set it again.
2016-10-27 21:26:55 +02:00
Max Kellermann
60f72f0ff9
command/Storage: use std::unique_ptr
2016-10-27 21:04:40 +02:00
Max Kellermann
debc855806
Merge branch 'v0.19.x'
2016-10-27 21:01:27 +02:00
Max Kellermann
49c04ccfc7
decoder/sidplay: fix playback speed with libsidplayfp
...
https://bugs.musicpd.org/view.php?id=4577
2016-10-27 20:25:19 +02:00
Max Kellermann
11ba44870b
decoder/sidplay: simplify seek loop
2016-10-27 20:25:12 +02:00
Max Kellermann
f9a64d24bf
storage/Composite: eliminate the second FindStorage() overload
...
It was used in a wrong way, which did not deal with errors
consistently. And if that's wrong, there is no need for FindStorage()
at all - let's remove it and the confusion around it.
2016-10-27 19:55:20 +02:00
Max Kellermann
e1a8dcfcc8
storage/Composite: add FindStorage() API documentation
2016-10-27 19:55:08 +02:00
Max Kellermann
1ee0e29974
storage/Composite: fix documentation typo
2016-10-27 17:12:24 +02:00
Max Kellermann
10e32454ef
lib/sqlite, sticker: migrate from class Error to C++ exceptions
2016-10-27 07:50:08 +02:00
Max Kellermann
8d41e9658f
Instance: remove Error parameter from GetDatabase()
2016-10-26 18:52:00 +02:00
Max Kellermann
086652dd50
Instance: add GetDatabaseOrThrow()
2016-10-26 18:47:19 +02:00
Max Kellermann
77a9940461
decoder/ffmpeg: ignore empty packets
...
An empty packet would be a command for avcodec_send_packet() to
finalize the codec.
Fixes https://bugs.musicpd.org/view.php?id=4588
2016-10-26 18:29:07 +02:00
Max Kellermann
9c1c180ae0
tag/Item: declare value[] to have only one element
...
By declaring the variable-length array to have a nominal size of 1,
struct TagPoolSlot shrinks from 24 bytes to 16 bytes, because "ref"
and "item" now both fit in one machine word.
2016-10-26 18:26:01 +02:00
Max Kellermann
06682bd2a9
tag/Item: remove "packed" attribute, add static_assert on alignment instead
...
The "packed" attribute triggers a clang 4.0 warning, and it's not
necessary. All we want is correct allocation of this
dynamically-sized struct.
2016-10-26 18:24:16 +02:00
Max Kellermann
6135f0763b
playlist/cue/CueParser: update API documentation
2016-10-26 17:07:52 +02:00
Max Kellermann
2f2b394d72
fs/StandardDirectory: no /etc/passwd lookups on Android
...
This doesn't make sense on Android; there is no home directory for
users.
2016-10-26 17:00:17 +02:00
Max Kellermann
ba181ae9df
fs/io/FileOutputStream: work around -Wunused
2016-10-26 17:00:17 +02:00
Max Kellermann
f62546ec79
decoder/mad: use C++11 initializers
2016-10-25 18:52:54 +02:00
hawken
1c155a0d03
Fix for TextInputStream consuming file without producing lines
2016-10-12 12:19:04 +02:00
hawken
8f196db778
Fix for segfault on uninitialized state_file
2016-10-12 12:18:44 +02:00
Yue Wang
d0302d1bbe
_delay in output plugin will now ask the thread to repeatedly wait until it returns 0.
...
change the _delay API doc so that it matches its implementation behavior.
2016-09-19 10:24:56 -07:00
Yue Wang
d73267df5e
use osx_output_delay to wait until ring buffer is able to write
...
This further optimize the performance.
This is now working properly with a conditional variable bug being fixed (8bbfb5cda1
).
2016-09-19 08:51:03 -07:00
Christian Körner
8bbfb5cda1
thread/PosixCond: fix timed_wait
...
pthread_cond_timedwait() in PosixCond.hxx:timed_wait(PosixMutex...) returns
EINVAL, if ts.tv_nsec >= 1E9. In this case, it returns to early.
Find attached a patch which fixes this. I chose a compare-subtraction method
to keep ts.tv_nsec below 1E9.
Another option would be
ts.tv_sec += ts.tv_nsec / 1000000000;
ts.tv_nsec %= 1000000000;
But I guess this takes more time on some ARM processors, which don't support
hardware division.
2016-09-19 11:21:21 +02:00
Yue Wang
f881917d2f
Fix a bug that buffer_frame_size is not properly initialized
2016-09-18 21:09:57 -07:00
Yue Wang
99244f51b0
Remove unused imports
2016-09-18 19:40:55 -07:00
Yue Wang
606d029ed9
Kill mutex and locks in osx_render. Improve performance. Also fix an initialization problem
2016-09-18 19:40:04 -07:00
Yue Wang
e4b9d679fb
options for sample rate syncing and device hogging
2016-09-18 19:12:45 -07:00
Yue Wang
4a8a33ea85
Hogging is for user selected device only.
...
do not hog system device.
2016-09-18 13:15:46 -07:00
Yue Wang
ac4b83046a
Add sample rate synchronization and device hogging to core audio plugin
...
which ensures mpd do bit perfect playback on OS X
2016-09-18 12:52:08 -07:00
Max Kellermann
2a2ac35b98
decoder/ffmpeg: FfmpegOpenInput() throws exception on error
2016-09-16 18:49:22 +02:00
Max Kellermann
8c744efd56
input/InputStream: migrate from class Error to C++ exceptions
2016-09-16 17:43:36 +02:00
Max Kellermann
597e59f10d
input/thread: use C++ exceptions instead of class Error
2016-09-16 17:43:32 +02:00
Max Kellermann
3cd07d0b54
input/thread: use class ScopeLock and ScopeUnlock
2016-09-16 17:43:32 +02:00
Max Kellermann
13259225c2
input/async: eliminate attribute "postponed_error"
...
Switch the remaining users to "postponed_exception".
2016-09-16 17:43:32 +02:00
Max Kellermann
7acd91331c
input/curl: use C++ exceptions instead of class Error
2016-09-16 17:43:32 +02:00
Max Kellermann
0fdaca17a2
input/alsa: use C++ exceptions instead of class Error
2016-09-16 17:43:32 +02:00
Max Kellermann
539c0ed171
{input,storage}/nfs: use C++ exceptions instead of class Error
2016-09-16 17:43:32 +02:00
Max Kellermann
553365b942
Log: add std::exception_ptr overloads
2016-09-16 17:43:32 +02:00
Max Kellermann
100308db02
db/update: catch exceptions from Storage plugins
2016-09-16 17:43:32 +02:00
Max Kellermann
ab967462e6
tag/{ApeLoader,Id3Load}: catch InputStream exceptions
2016-09-16 17:37:22 +02:00
Max Kellermann
1bc553ea62
decoder/DecoderAPI: catch InputStream::Read() exceptions
2016-09-16 17:34:53 +02:00
Max Kellermann
687ea53616
input/nfs: use class ScopeUnlock
2016-09-16 16:51:36 +02:00
Max Kellermann
220d9528a3
archive/Plugin: migrate open() from class Error to C++ exceptions
2016-09-09 18:36:36 +02:00
Max Kellermann
fc7d3f64c0
input/Plugin: migrate open() from class Error to C++ exceptions
2016-09-09 18:15:01 +02:00
Max Kellermann
63ab7767a3
event/Call: rethrow exceptions in calling thread
2016-09-09 18:14:21 +02:00
Max Kellermann
20894d1c5e
playlist/SoundCloud: use AtScopeExit()
2016-09-09 18:04:11 +02:00
Max Kellermann
2f03d2234a
playlist/SoundCloud: use std::string
2016-09-09 18:01:36 +02:00
Max Kellermann
dadf3d846b
playlist/SoundCloud: implicit SoundCloudJsonData initialization
2016-09-09 18:01:01 +02:00
Max Kellermann
941a9284b9
playlist/SoundCloud: rename struct parse_data to SoundCloudJsonData
2016-09-09 18:00:26 +02:00
Max Kellermann
4ee3820bd6
playlist/SoundCloud: make parse_callbacks constexpr
2016-09-09 17:59:42 +02:00
Max Kellermann
c155df5d79
playlist/SoundCloud: use ScopeLock
2016-09-09 17:59:07 +02:00
Max Kellermann
33b70567c8
input/alsa: use AtScopeExit()
2016-09-09 17:12:52 +02:00
Max Kellermann
720bf51ba6
input/alsa: simplify OpenDevice(), merge redundant recovery code
2016-09-09 17:12:52 +02:00
Max Kellermann
26bdb72428
input/Init: set input_plugins_enabled
...
Got lost in commit 6ed77f2a27
2016-09-09 17:12:52 +02:00
Max Kellermann
90c8a1b1cf
input/archive: use AtScopeExit() for exception-safety
2016-09-09 16:32:11 +02:00
Max Kellermann
3143dbf3dc
input/Open: use ScopeLock
2016-09-09 16:11:51 +02:00
Max Kellermann
38d587aaeb
decoder/wavpack: wavpack_open_wvc() returns InputStreamPtr
...
Let std::unique_ptr manage both the InputStream and the WavpackInput.
2016-09-09 16:04:57 +02:00
Max Kellermann
fe9bafa741
decoder/wavpack: use AtScopeExit() for exception-safety
2016-09-09 15:55:58 +02:00
Max Kellermann
8092e18158
input/async: add attribute "postponed_exception"
...
Will replace "postponed_error".
2016-09-09 15:41:09 +02:00
Max Kellermann
6ed77f2a27
input/Plugin: migrate init() from class Error to C++ exceptions
2016-09-09 15:16:47 +02:00
Max Kellermann
a73688a2be
input/Plugin: remove InitResult::UNAVAILABLE, throw PluginUnavailable instead
2016-09-09 15:11:52 +02:00
Max Kellermann
e7d327226a
mixer: migrate to C++ exceptions
2016-09-09 14:44:15 +02:00
Max Kellermann
ae1eb9ccde
pcm/Convert: migrate from class Error to C++ exceptions
2016-09-09 14:44:13 +02:00
Max Kellermann
860064c812
output/pulse: use a RTTI lock guard
...
Make all the locks exception-safe.
2016-09-09 14:36:24 +02:00
Max Kellermann
845901ab01
decoder/Internal: convert error from Error to std::exception_ptr
2016-09-08 20:56:05 +02:00
Max Kellermann
25f7360264
decoder/Thread: throw InputStream::Open() errors
...
Code simplification.
2016-09-08 20:54:55 +02:00
Max Kellermann
78ec7d0fe1
decoder/Thread: throw StopDecoder on DecoderCommand::STOP
2016-09-08 20:54:55 +02:00
Max Kellermann
a1e9678b69
decoder/Thread: std::throw_with_nested() to wrap caught exception
2016-09-08 20:54:55 +02:00
Max Kellermann
be5d629c13
Log: recognize class Error as nested exception
2016-09-08 20:54:55 +02:00
Max Kellermann
957b399e90
decoder/Thread: call FlushChunk() using AtScopeExit()
...
Be exception-safe.
2016-09-08 20:41:44 +02:00
Max Kellermann
5e6c164b9f
decoder/Internal: use C++11 initializers
2016-09-08 20:34:39 +02:00
Max Kellermann
5d9a889190
decoder/Thread: throw C++ exceptions on error
2016-09-08 20:26:40 +02:00
Max Kellermann
a9acc9c971
decoder/Thread: catch C++ exceptions from the decoder plugin
2016-09-08 19:24:15 +02:00
Max Kellermann
308010794a
decoder/Control: convert error from Error to std::exception_ptr
...
Prepare full C++ exception support in the decoder thread.
2016-09-08 17:16:03 +02:00
Max Kellermann
0ce72cbf9d
player/Control: convert error from Error to std::exception_ptr
...
Prepare full C++ exception support in the player thread.
2016-09-08 12:15:14 +02:00
Max Kellermann
6e52ab285a
player/Control: use class Error as C++ exception, throw it
2016-09-08 12:07:22 +02:00
Max Kellermann
3da4648112
command/Player: restore "single" mode using AtScopeExit()
2016-09-08 12:07:22 +02:00
Max Kellermann
1897409476
player/Control: update API documentation
2016-09-08 12:07:22 +02:00
Max Kellermann
c60d65dd8f
command/All: catch class Error
2016-09-08 12:07:22 +02:00
Max Kellermann
f29949e14d
command/Error: support class Error as C++ exception
2016-09-08 10:34:02 +02:00
Max Kellermann
75aa98ddaa
command/Error: merge the two try/catch blocks
2016-09-08 10:34:02 +02:00
Max Kellermann
06909f4f00
util/Error: remove explicit move constructor, allow copying
...
The C++ compiler will auto-generate move and copy
constructors/operators for us.
2016-09-08 10:34:02 +02:00
Max Kellermann
aca081557a
queue/PlaylistControl: use PlaylistError::NotPlaying()
2016-09-05 20:37:24 +02:00
Max Kellermann
a71efacd1e
queue/PlaylistControl: fix return value in PlayNext(), PlayPrevious()
...
Failure must be indicated by returning false.
2016-09-05 19:21:23 +02:00
Max Kellermann
871063dab7
neighbor/Plugin: migrate from class Error to C++ exceptions
2016-09-05 11:37:58 +02:00
Max Kellermann
135662d6b0
lib/smbclient/Init: throw std::runtime_error on error
2016-09-05 11:32:20 +02:00
Max Kellermann
a69c3c1848
neighbor/Glue: support C++ exceptions
2016-09-05 11:31:23 +02:00
Max Kellermann
50e5244e25
input/Init: support C++ exceptions
2016-09-05 11:28:05 +02:00