Max Kellermann
9a0b3775d8
encoder/ToOutputStream: add API docs
2023-09-26 15:48:55 +02:00
Max Kellermann
2075a9a999
encoder/ToOutputStream: remove unnecessary cast
2023-09-26 15:48:22 +02:00
Max Kellermann
8ba68fdb47
io/OutputStream: use std::span
2023-05-21 21:35:11 +02:00
Max Kellermann
43b26ee612
{de,en}coder/flac: remove obsolete FLAC_API_VERSION_CURRENT checks
...
We check the libFLAC version via pkg-config at configure time, no need
to do it again.
2023-03-10 12:43:19 +01:00
Max Kellermann
815b248990
*/Registry: use `constinit`
2023-03-07 12:04:16 +01:00
Max Kellermann
a302d34f6d
tag/Names: convert to C++
2023-03-06 15:16:33 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
fa58db798b
lib/fmt/RuntimeError: new library
...
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
Max Kellermann
45599e7840
Merge branch 'v0.23.x'
2022-09-27 20:40:41 +02:00
Anthony DeRossi
9ab9b97f20
encoder/flac: only set a serial number for oggflac
...
This fixes a bug introduced in 87fa6bca
where the FLAC encoder fails to
initialize unless libFLAC is built with Ogg support. When libFLAC is
built without Ogg support, FLAC__stream_encoder_set_ogg_serial_number
unconditionally returns false.
2022-09-16 17:58:41 -07:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
0158a2b6b9
encoder/flac: refactor input buffer conversion
2022-07-12 12:31:08 +02:00
Max Kellermann
00b8ced09f
encoder/flac: Read() returns the internal buffer
2022-07-12 12:19:55 +02:00
Max Kellermann
3e2de560ca
encoder/lame: eliminate the audio_format field
2022-07-12 12:08:46 +02:00
Max Kellermann
c266fb7758
encoder/lame: Read() returns the internal buffer
...
Eliminate memcpy() calls.
2022-07-12 12:01:31 +02:00
Max Kellermann
0d09f307b2
encoder/Interface: update API docs
2022-07-12 12:00:02 +02:00
Max Kellermann
7e14f8f830
encoder/Interface: pass std::span to Write() and Read()
2022-07-12 10:33:59 +02:00
Max Kellermann
28e044a36a
encoder/lame: use std::size_t
2022-07-12 10:14:10 +02:00
Max Kellermann
4e91d8279b
encoder/vorbis: use std::size_t
2022-07-12 10:11:30 +02:00
Max Kellermann
e861d4f83d
encoder/interface: make Read() `noexcept` (all implementations are)
2022-07-12 10:07:38 +02:00
Max Kellermann
31d89b36cf
encoder/flac: use std::size_t
2022-07-12 09:53:16 +02:00
Max Kellermann
c55e250c45
encoder/Interface: include cleanup
2022-07-11 22:38:24 +02:00
Max Kellermann
cd241a93c1
util/DynamicFifoBuffer: pass std::span to Append()
2022-07-11 22:38:24 +02:00
Max Kellermann
53acf7ae82
encoder/*: use std::byte instead of uint8_t
2022-07-11 22:38:24 +02:00
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