Commit Graph

112 Commits

Author SHA1 Message Date
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
Max Kellermann a4eeaff63f config/File: move duplicate code to ExpectValueAndEnd() 2018-07-17 20:28:50 +02:00
Max Kellermann 7807ddae57 config/Param: allow moving the value 2018-07-17 20:27:52 +02:00
Max Kellermann 566af6827e config/Param: inline the constructor 2018-07-17 20:27:49 +02:00
Max Kellermann bf046d895e config/Param: use C++11 initializers 2018-07-17 20:27:47 +02:00
Max Kellermann af33a9f4b8 config/Block: allow moving name and value 2018-07-17 20:27:46 +02:00
Max Kellermann e9a4570891 config/Block: use C++11 initializers 2018-07-17 20:16:19 +02:00
Max Kellermann 99d5b61698 fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
2018-07-17 18:33:32 +02:00
Max Kellermann d13a64455c config/File: use nested exception to annotate file name and line number 2018-07-16 20:00:29 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 9c6b52ccee Permission: add special permissions for local sockets
Closes #296
2018-07-15 22:27:35 +02:00
Max Kellermann bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00
Max Kellermann be65c7d5d0 config/Block: add method GetPositiveValue()
Adds missing checks to several plugins.
2018-01-02 17:24:34 +01:00