Max Kellermann
cfb678d618
config/Parser: work around conflicting macro MAX_INPUT
...
linux/limits.h defines MAX_INPUT which breaks the build.
2019-05-30 16:10:01 +02:00
Max Kellermann
4eb101f046
config/Parser: add ParseSize()
...
Supports suffixes such as "kB" and "MB".
2019-05-29 22:44:05 +02:00
Max Kellermann
af7970337b
config/Parser: get_bool() throws on error
2019-05-29 22:35:40 +02:00
Max Kellermann
96a37da03d
config/Block: add method With()
2019-05-29 22:35:36 +02:00
Max Kellermann
ece35552fe
config/Block: add ThrowWithNested()
2019-05-29 22:33:51 +02:00
Max Kellermann
fdbec694c6
config/Param: add method With()
2019-05-29 21:50:04 +02:00
Max Kellermann
b86d8d0cd8
config/Param: add method ThrowWithNested()
2019-05-29 21:46:27 +02:00
Max Kellermann
a854595886
event/ServerSocket: runtime error if abstract sockets are unavailable
2019-03-20 13:09:16 +01:00
Max Kellermann
4f408bd952
event/ServerSocket, doc, ...: refer to AF_LOCAL as "local socket"
...
.. and not "UNIX domain socket. Be consistent about the naming.
2019-03-20 12:57:26 +01:00
Max Kellermann
44422b2b2f
event/ServerSocket, config/Net: abstract socket support
2019-02-25 13:08:33 +01:00
Max Kellermann
ce49d99c2f
check.h: remove obsolete header
...
Since we switched from autotools to Meson in commit
94592c1406
, we don't need to include
`config.h` early to properly enable large file support. Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.
This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann
f5c9071494
*: copyright year 2018
2018-10-31 17:54:59 +01:00
Max Kellermann
94592c1406
build with Meson instead of autotools
...
So long, autotools! This is my last MPD related project to migrate
away from it. It has its strengths, but also very obvious weaknesses
and weirdnesses. Today, many of its quirks are not needed anymore,
and are cumbersome and slow. Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann
5b2374b949
player/Thread: calculate buffered_before_play
based on a fixed duration
...
Previously, there was the setting `buffered_before_play` which
specified a percentage of the audio buffer, defaulting to `10%`. That
was working well enough for quite some time, until high-quality audio
formats became common.
At 44.1 kHz, 16 bit stereo, MPD collected 2.3 seconds worth of data in
the buffer before starting playback. With the same default settings
and 192 kHz, 24 bit stereo, that was only 0.27 seconds.
Making this depend on the byte size only leads to high latency at low
quality, and too little data at high quality. The natural choice
would be to use a duration instead of a byte size, which should give
the same good experience with all audio formats.
Since the `buffered_before_play` configuration setting was not
understood well by users and caused more harm than good, this commit
deprecates it. It has now no effect.
2018-09-23 15:46:29 +02:00
Max Kellermann
a82d864c91
config/File: print warning about deprecated options
2018-09-23 15:43:38 +02:00
Max Kellermann
ec54754e22
Compiler.h: move to util/
2018-08-20 16:19:17 +02:00
Max Kellermann
bd32a11016
config/Global: remove obsolete library
2018-08-19 23:08:41 +02:00
Max Kellermann
afd0fe666a
config/Global: move config_global_check() to Check.cxx
2018-08-19 23:01:30 +02:00
Max Kellermann
5f95c07305
config/Path: add InitPathParser()
...
Eliminate yet another access to the global ConfigData instance.
2018-08-19 22:29:39 +02:00
1848
52521d02ea
Added a function for generic address parsing
...
Changed listen_add_config_param() to use generic address parsing
2018-08-07 19:18:33 +02:00
Max Kellermann
68c023cdd8
config/Path: simplify expression
2018-08-02 09:43:48 +02:00
Max Kellermann
b18b0bf328
config/Path: remove unnecessary IsNull() check
...
`AllocatedPath::FromUTF8Throw()` will never return a nulled instance.
2018-08-02 09:43:17 +02:00
Max Kellermann
f30265a9ee
config/File: support wildcards in "include"
2018-07-18 17:28:30 +02:00
Max Kellermann
09f743dc1a
config/File: add directive "include_optional"
2018-07-18 13:10:36 +02:00
Max Kellermann
035f986a91
config/File: support absolute paths in "include"
2018-07-18 13:09:04 +02:00
Max Kellermann
06c2aef3c7
config/File: fix typo in comment
2018-07-18 12:39:39 +02:00
Max Kellermann
d06ef76e58
config/File: implement the "include" directive
...
This is an experimental draft. More needs to be done.
2018-07-18 11:27:41 +02:00
Max Kellermann
57729683b6
config/Data: pass new items by rvalue reference
2018-07-18 11:21:59 +02:00
Max Kellermann
9ff2606bb8
config/Data: use std::forward_list to manage params and blocks
2018-07-18 11:03:19 +02:00
Max Kellermann
fd80683ade
decoder/mad: make "gapless_mp3_playback" a block option
...
Remove another dependency on the config/Global library.
2018-07-18 10:50:09 +02:00
Max Kellermann
49efb6071c
config/Migrate: library to migrate deprecated settings
2018-07-18 10:25:02 +02:00
Max Kellermann
8df98932b1
config/Data: add methods AddParam(), AddBlock()
2018-07-18 10:17:45 +02:00
Max Kellermann
95481dda86
config/Global: remove unused function config_get_param()
2018-07-17 23:42:20 +02:00
Max Kellermann
e8a7c6cee3
config/Global: remove unused function config_get_block()
2018-07-17 23:14:47 +02:00
Max Kellermann
60b2338091
config/Global: remove unused function config_get_path()
2018-07-17 22:59:09 +02:00
Max Kellermann
667daab056
config/Global: remove unused function config_get_unsigned()
2018-07-17 22:56:14 +02:00
Max Kellermann
86c531b37d
config/Data: move std::chrono parsers from Global.hxx
2018-07-17 22:53:17 +02:00
Max Kellermann
ffe6819966
config/Global: move value parser code to struct ConfigData
2018-07-17 22:28:08 +02:00
Max Kellermann
8af75c78f8
config/{Global,Block}: throw exception on parser error
2018-07-17 22:23:04 +02:00
Max Kellermann
696add259b
config/Global: remove unused function config_find_block()
2018-07-17 22:15:10 +02:00
Max Kellermann
9fe0585056
config/Global: add GetGlobalConfig()
2018-07-17 22:05:20 +02:00
Max Kellermann
8c366f0774
config/Data: automatic initialization
2018-07-17 22:05:18 +02:00
Max Kellermann
eeaaea802a
config/Data: FindBlock() throws on error
2018-07-17 21:18:18 +02:00
Max Kellermann
15c36baefd
config/Data: add method FindBlock()
2018-07-17 21:16:20 +02:00
Max Kellermann
33deb84aa1
config/Data: make getters const
2018-07-17 21:16:11 +02:00
Max Kellermann
b211d31a64
config/Data: add getter methods
2018-07-17 21:11:52 +02:00
Max Kellermann
5b192beaa5
config/Global: remove ConfigBlock::SetUsed() call, let caller do that
...
This fixes an old bug which caused the "unused" warnings to be
unreliable; only the first block in the list was marked as being
"used", no matter if it was really used, and the rest was never marked
as "used", suppressing all warnings for them.
2018-07-17 21:08:41 +02:00
Max Kellermann
ef38330d74
config/Block: add method SetUsed()
2018-07-17 21:06:15 +02:00
Max Kellermann
987b60ae73
config/Block: make "used" mutable
2018-07-17 21:05:55 +02:00
Max Kellermann
7db0f7c4da
config/Param: remove unused "used" flag
2018-07-17 20:44:07 +02:00