Commit Graph

201 Commits

Author SHA1 Message Date
Max Kellermann
bb7be9a4cd util/*FifoBuffer: migrate from WritableBuffer to std::span 2022-05-19 14:01:57 +02:00
Max Kellermann
b175e4128d encoder/meson.build: always generate encoder/Features.h
Fixes regression from commit 85f9863e0a
2022-05-09 22:52:59 +02:00
Max Kellermann
85f9863e0a meson.build: always enable Wave encoder for Snapcast
Even if the "wave_encoder" option is disabled (and no other encoder
plugins are enabled), forcefully enable the Wave encoder (if Snapcast
is enabled).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1500
2022-04-26 20:13:43 +02:00
Max Kellermann
a5fa43b526 fs/io: move to io/ 2021-12-03 14:35:41 +01:00
Max Kellermann
b29a43b4d7 decoder/mad, ...: more libfmt logging 2021-06-25 20:52:08 +02:00
Rosen Penev
220d2bf026 clang-tidy: add explicit deleted constructors
Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:47:20 -07:00
Rosen Penev
9ef1cf15a9 clang-tidy: default virtual destructors
Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:46:46 -07:00
John Regan
87fa6bca54 flac encoder: enable Ogg FLAC and Ogg chaining
refactors GenerateOggSerial into a generic GenerateSerial
utility, under the util lib.

libFLAC may be encoded without Ogg support. If Ogg support is disabled,
libFLAC will still export Ogg-related methods (like setting a serial
number), and throw a runtime error when initializing an Ogg stream.

GenerateOggSerial does not depend on libogg. Refactoring it into
a generic GenerateSerial prevents having to add build-time checks
for libogg within the FLAC encoder plugin.
2021-05-15 11:31:01 -04:00
Max Kellermann
85adefd9a4 encoder/wave: remove constexpr because memcpy() is not allowed 2021-02-17 14:19:02 +01:00
Max Kellermann
8a4b88a59d encoder/wave: use the structs from RiffFormat.hxx 2021-02-16 19:50:52 +01:00
Max Kellermann
d2371af120 encoder/wave: add static_assert on sizeof(WaveHeader) 2021-02-16 19:50:46 +01:00
Max Kellermann
aa2e1bb310 encoder/wave: refactor fill_wave_header() to function 2021-02-16 19:50:43 +01:00
Rosen Penev
594dfe572b
clang-tidy: mark a bunch of variables constexpr
Found with cppcoreguidelines-interfaces-global-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-16 18:35:31 -08:00
Ethan Halsall
0d606c743b add additional opus encoder options 2021-01-09 22:04:00 -06:00
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
fd217daad4 meson.build: always write encoder/Features.h
Fixes a build failure in `CommandLine.cxx`.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/905
2020-07-01 15:16:14 +02:00
Max Kellermann
8f178401e4 */plugins/meson.build: define feature macros in Features.h
This makes ccache more efficient when recompiling with different
plugins.
2020-05-05 15:06:50 +02:00
Rosen Penev
cade4e71c4 [clang-tidy] add [[nodiscard]]
Found with modernize-use-nodiscard

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-19 13:38:40 +01:00
Rosen Penev
6d91b5c7b2
fix double promotions
Found with -Wdouble-promotion

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 12:43:24 -07:00
Rosen Penev
97425d56e7
remove gcc_unused
[[maybe_unused]] (introduced in C++17) is standard C++.

https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07: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
f00f8b002a
[clang-tidy] use nodiscard
Introduced in C++17. It replaces gcc's warn_unused_result.

Found with modernize-use-nodiscard.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 12:59:16 -07:00
Rosen Penev
5d787806fe
[clang-tidy] add ending namespace comments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-16 16:44:37 -08:00
Max Kellermann
d4a6d647a0 Merge branch 'efuhgeh' of git://github.com/neheb/MPD 2020-02-16 19:03:35 +01:00
Rosen Penev
9cf1385765
[clang-tidy] remove static in namespace
Found with readability-static-definition-in-anonymous-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:25:31 -08:00
Rosen Penev
a3963de668
[clang-tidy] change integer prefixes to uppercase
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:20:50 -08:00
Max Kellermann
bc6eca2115 *: add explicit 2020-02-01 14:02:43 +01:00
Max Kellermann
72ec641f0d *: use auto 2020-02-01 14:02:43 +01:00
Max Kellermann
cd612c4eef AudioFormat: move to pcm/ 2020-01-18 20:24:59 +01:00
Max Kellermann
914ad261ed pcm/meson.build: split libpcm into two
One basic library without dependencies, and one with heavy
dependencies like libsamplerate.
2020-01-18 20:08:23 +01:00
Max Kellermann
2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann
d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann
8480b834b3 encoder/Interface: add noexcept 2019-07-04 22:44:36 +02:00
Max Kellermann
07080574a2 encoder/Interface: allow throwing any exception 2019-07-04 22:44:11 +02:00
Max Kellermann
e87f0ca771 pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
Max Kellermann
a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann
f8570dd79f encoder/opus: use new[] instead of xalloc() 2019-04-03 14:22:32 +02:00
Max Kellermann
c176d94598 system/ByteOrder: move to util/ 2019-03-08 10:21:10 +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
ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann
816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
cathugger
47d1d3c855 encoder/opus: add optional stream chaining support
support for chaining ogg opus streams to enable changing stream' metadata on the fly.
currently support is opt-in (enabled by additional option) because lots of clients can't handle this properly yet.
2018-02-25 15:27:08 +00:00
Max Kellermann
60efdce5ff Merge branch 'v0.20.x' 2018-02-17 13:37:03 +01:00
cathugger
c43ea74b30 encoder/opus: initialize granulepos to 0
it was uninitialized before
2018-02-17 01:22:17 +01:00
Max Kellermann
e2c81aa9ea Merge branch 'v0.20.x' 2017-11-14 12:31:13 +01:00
Max Kellermann
aea37e46e3 encoder/vorbis: default to quality 3
Don't require a quality or bitrate setting.  If nothing is set, don't
fail startup - just go with a good default.  A quality setting of 3 is
what "oggenc" defaults to as well.
2017-11-14 11:30:28 +01:00
Max Kellermann
6464b4b372 encoder/Configured: glue code to initialize PreparedEncoder 2017-11-10 21:54:57 +01:00