Commit Graph

146 Commits

Author SHA1 Message Date
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
27cc7b352d config/Data: cast to std::chrono::steady_clock::duration properly
Oh no, 3413d1bf23 was broken!  Instead of passing a number as
"seconds" to the duration constructor, it just abused the duration
constructor as cast operator, which caused custom state_file_interval
settings to be extremely short.
2020-10-08 20:30:33 +02:00
Max Kellermann
d64729065e config/Parser: use std::size_t 2020-10-08 20:26:39 +02:00
Max Kellermann
ab318200db config/{Data,Block}: use With() in GetUnsigned(), GetPositive() 2020-10-08 20:21:09 +02:00
Rosen Penev
e4dad42ca1 use std chr functions
The ones in std have overloads for const char/char.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Rosen Penev
71792ffd43 [clang-tidy] use raw string
Found with modernize-raw-string-literal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-22 18:21:00 +02:00
Rosen Penev
2db8bcc353
replace stddef.h with cstddef
The former is deprecated with C++14. The standard says both are the same:

The contents and meaning of the header<cstddef>are the same as the C
standard library header<stddef.h>,except that it does not declare the type
wchar_t, that it also declares the type byte and its associated
operations (21.2.5), and as noted in 21.2.3 and 21.2.4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:38 -07:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
The former was deprecated with C++14.

According to the C++11 and C++17 standards, both files are identical.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Rosen Penev
ac50bb5d2b [clang-tidy] remove needless std::move
Found with performance-move-const-arg

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-20 16:47:34 +01:00
Rosen Penev
a4eed3e330
[clang-tidy] use forward instead of move
Found with bugprone-move-forwarding-reference

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 18:31:00 -08:00
Max Kellermann
72ec641f0d *: use auto 2020-02-01 14:02:43 +01:00
Max Kellermann
7551867249 meson.build: move Log.cxx and LogBackend.cxx into a static library
Prevents compiling those sources many times, once for each debug
program using it.
2020-01-18 19:56:16 +01:00
Max Kellermann
2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann
8db86e2820 Revert "pcm/Convert: add option to enable the integer-only dsd2pcm implementation"
This reverts commit c84bae739a.  A
configuration option is not necessary, because the PcmConvert
constructor knows already whether integer or floating point is needed.
2020-01-17 19:11:10 +01:00
Max Kellermann
c84bae739a pcm/Convert: add option to enable the integer-only dsd2pcm implementation 2020-01-17 16:37:09 +01:00
Max Kellermann
dca79938d5 release v0.21.19
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl4hyV4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEndhD/0SFrzS6I8+9Tsz4f3tAhKH9qaHCepZLJ6o
 kpv/qYbbVsIWLtYJtteNi9JTa17MI0s8GgR3/OeEUwmfTdy/HFKrRjT5ptGy2lmk
 OBH34vgQsOPIRsdba6UqWHgLFYBwGm3CoCnwKwxGD2ZhCQt7UC7GWxVh70AX6ncj
 sWlYtXbabfS1V+vGhiS4o0yNFHLsyxXPAGvaf5gHkP5OT+kJDYgv3YlIHzEKmoiO
 xf2pQtvq62YLPXyBR2FEklBN/H6l13e7HZYeTLli6fPUFJIgslI6wgCh4mlvPyx7
 7/PXuQjYOfoMtZRsFKo+V84KzIsHQvnhuusFb1iXZnWIYfSzYR09MlTirGEyGEqd
 rEZxw9J00TDSWqOnAFOR1ThsgmtAabGT2On1N1ultvvbOLsyiW/N1Vrp7MuNzWK1
 Fe9ICwucJztWHcnR2GR0vlnzXvN3bQBadQMRH0Gh3DZGTso3VEOlvkzlcyQNrzZ5
 JeIOUtp83mAOnBe2CzP12KMbWF2OYTuX9IjHQpRftpzSnv1IPgvgIBJ9hUD71l3n
 Io4LJfkrLtnMU9Y0l8nB4ri9wq9yOkWiKsdpDzWWWqCaRkKcB93CGXyPA53gYbTS
 vD/HaYC4qHkUg5SeBHiH/FDjbLAaM+1G1btctVNMIuSBtBsIjpa8yerppTx7pCfZ
 UDjOGZeqCg==
 =hNuk
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.19'

release v0.21.19
2020-01-17 15:58:11 +01:00
Max Kellermann
4f11fa0d41 config/File: allow overriding top-level settings in includes
Remove the error message and instead erase the old setting if the
"repeatable" flag is not set.

https://github.com/MusicPlayerDaemon/MPD/issues/684
2020-01-17 14:58:40 +01:00
Max Kellermann
831bc711ca decoder/mad: remove option "gapless", always do gapless
Why would anybody want to keep the silence inserted by the codec?
Other plugins/codecs (such as Vorbis) have this hard-coded as well.
2019-08-12 13:05:57 +02:00
Max Kellermann
cde6c46d2f util/Macros: replace with std::size() (C++17) 2019-08-03 13:10:49 +02:00
Max Kellermann
d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann
a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann
5d74b5cee1 input/cache: first draft of the file cache 2019-05-31 17:49:52 +02:00
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