boedy
731f20111a
Override the value for file size in bytes. Useful for getting sensible track length values in feed mode or for HTTP streams.
...
https://www.mpg123.de/api/group__mpg123__status.shtml#gad0301e80dbc3f48e47e27d39cd328755
2024-08-08 18:43:15 +02:00
Max Kellermann
8e42467bd2
decoder/mpg123: relax mpg123_length() check in Scan()
...
Do not fail the Scan() function completely if libmpg123 cannot
determine the duration.
2024-07-12 16:11:08 +02:00
Max Kellermann
e00e7802c8
decoder/mpg123: report unknown duration if mpg123_length()<0
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2058
2024-07-12 16:09:35 +02:00
Max Kellermann
55d0bbade2
decoder/mpg123: move code to GetDuration()
2024-07-12 16:08:11 +02:00
Max Kellermann
49edb16de0
decoder/Thread: add enum DecodeResult, log better diagnostics
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2076
2024-07-11 16:47:43 +02:00
Max Kellermann
8671896e4c
decoder/Thread: throw StopDecoder if command==STOP in decoder_run_stream()
...
Everybody else is doing that, so let's do the same and not pretend
playback was successful.
2024-07-11 16:28:57 +02:00
Max Kellermann
c2470ebd9c
decoder/List: eliminate decoder_plugins_try()
...
Migrate callers to GetEnabledDecoderPlugins(). By not using lambdas,
we can switch to enums as return value for better diagnostics.
2024-07-11 16:15:38 +02:00
Max Kellermann
a27fb71c4c
decoder/List: add iterable container for decoder plugins
2024-07-11 15:30:31 +02:00
Max Kellermann
a196d1ddf2
decoder/Thread, ...: quote log strings
2024-07-10 15:40:04 +02:00
Max Kellermann
381215fd73
*: use std::scoped_lock with implicit template parameter
2024-05-23 20:54:49 +02:00
Max Kellermann
34f7b38f39
input/InputStream: pass std::span<std::byte> to Read()
2024-05-13 12:28:40 +02:00
Max Kellermann
f28d10d934
decoder/dsdiff: convert pointers to references
2024-05-13 11:34:05 +02:00
Max Kellermann
0c1ecc96a8
*: let libfmt quote strings
2024-04-16 11:50:18 +02:00
Max Kellermann
d563f5fc87
decoder/mpg123: use mpg123_ssize_t only on MPG123_API_VERSION >= 47
2024-04-03 23:21:54 +02:00
Max Kellermann
9c2df5ce19
decoder/mpg123: implement stream_decode
2024-04-03 23:12:26 +02:00
Max Kellermann
1745c485f3
decoder/mpg123: move code to Scan()
2024-04-03 22:52:56 +02:00
Max Kellermann
a53db82ae4
decoder/mpg123: move code to Decode()
2024-04-03 22:49:43 +02:00
Max Kellermann
a20a83eb76
decoder/mpg123: move code to GetAudioFormat()
2024-04-03 22:37:29 +02:00
Max Kellermann
65e5a43e46
decoder/List: prefer "mpg123" over "mad"
...
libmad hasn't been maintained for many many years, while libmpg123 is
still maintained.
Our "mad" plugin can't do streams, but MPD will automatically fall
back to "mad" (or "ffmpeg") for streams.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1954
2024-04-03 22:25:34 +02:00
Max Kellermann
e4ba736d03
input/{async,rewind}, decoder/dsdiff: use std::cmp_*() for safer integer comparisons
2024-03-15 18:45:46 +01:00
Max Kellermann
e4cc89b2d9
Merge branch 'jg' of https://github.com/neheb/MPD
2024-01-13 22:38:34 +01:00
Rosen Penev
e8163124e3
mpg123: fix compilation under Windows
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-04 14:22:25 -08:00
Rosen Penev
0651be8366
fluidsynth: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-04 14:22:25 -08:00
Rosen Penev
4957035be6
mikmod: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-04 14:22:25 -08:00
Rosen Penev
bcd55c0b75
sidplay: fix compilation under Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-04 14:22:25 -08:00
Rosen Penev
914ee92015
wavpack: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-04 14:22:25 -08:00
Max Kellermann
4086190c80
decoder/OpusTags: use ParseInteger()
2024-01-04 21:06:38 +01:00
Max Kellermann
393d57b387
util/NumberParser: rename to CNumberParser
...
A new NumberParser library based on std::from_chars() will be added.
2024-01-04 21:02:45 +01:00
Rosen Penev
a859de6806
sndfile: fix compilation with clang's libc++
...
error: non-constant-expression cannot be narrowed from type 'sf_count_t'
(aka 'long long') to 'size_type' (aka 'unsigned int') in initializer list
[-Wc++11-narrowing]
215 | std::span{buffer, num_frames * frame_size},
| ^~~~~~~~~~~~~~~~~~~~~~~
note: insert an explicit cast to silence this issue
215 | std::span{buffer, num_frames * frame_size},
| ^~~~~~~~~~~~~~~~~~~~~~~
| static_cast<size_type>()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-03 12:18:52 -08:00
Max Kellermann
23b4688c44
util/ByteOrder: move Packed* classes to separate headers
2023-12-22 18:20:46 +01:00
Max Kellermann
a888b3a707
decoder/plugins/meson.build: add missing dependency to libid3tag
2023-12-22 18:03:47 +01:00
Max Kellermann
5ab2c31500
Merge branch 'v0.23.x'
2023-11-21 20:37:46 +01:00
skidoo23
50c1e3738a
decoder/ffmpeg: Fix build error with ffmpeg 6.1
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1898
2023-11-21 20:36:37 +01:00
Max Kellermann
7ccc4ddf0d
io/Reader: use std::span
2023-10-07 08:44:42 +02:00
Max Kellermann
dc31aa6a61
decoder/Plugin: remove unused and broken wrapper method ContainerScan()
2023-09-26 10:13:42 +02:00
Max Kellermann
9c19368fc7
Merge branch 'v0.23.x'
2023-06-02 14:36:02 +02:00
Shen-Ta Hsieh
fef6b9df80
flac: Try InputStream
interface if flac failed to read through a wchar_t
path
2023-06-02 14:28:22 +02:00
Max Kellermann
18d3a5c12b
decoder/flac: add noexcept
and inline
2023-06-02 14:22:11 +02:00
Simon Arlott
6ee3d0102b
decoder/mad: Fix decode of LAME peak value
...
6d91b5c7b2
("fix double promotions") changed
how LAME peak values are decoded, producing large incorrect values that
cause some MP3 files to play silently.
Restore the original decode from MAD fixed-point format to double and
document what it's doing.
Fixes #1823
2023-06-02 14:15:48 +02:00
latex
381934985a
reorder ffmpeg to be lower priority than gme
...
This should prevent ffmpeg from taking priority over the gme plugin.
The ffmpeg plugin is more buggy than gme.
One of the prominent bugs of preferring ffmpeg over gme is that ffmpeg
cannot seek SAP files while gme can. This should prevent that from
happening.
2023-05-21 20:58:53 +02:00
Max Kellermann
0206a46d39
decoder/gme: require GME 0.6 or later
...
This allows dropping a few compile-time version checks and we can use
pkg-config to detect the library.
2023-05-21 20:50:03 +02:00
latex
4e9f463bb6
reorder ffmpeg to be lower priority than gme
...
This should prevent ffmpeg from taking priority over the gme plugin.
The ffmpeg plugin is more buggy than gme.
One of the prominent bugs of preferring ffmpeg over gme is that ffmpeg
cannot seek SAP files while gme can. This should prevent that from
happening.
2023-05-12 00:28:56 +02:00
Max Kellermann
90c3fe22f5
decoder/openmpt: check libopenmpt version at compile time, not at configure time
2023-04-21 17:29:20 +02:00
Simon Arlott
ad8117e7c8
decoder/openmpt: Fix build error with libopenmpt < 0.5
...
openmpt_at_end is a string, not an integer
Fixes build error:
src/decoder/plugins/OpenmptDecoderPlugin.cxx: In function 'void mod_decode(DecoderClient&, InputStream&)':
src/decoder/plugins/OpenmptDecoderPlugin.cxx:85:44: error: invalid cast from type 'std::string_view' {aka 'std::basic_string_view<char>'} to type 'unsigned in '
85 | mod.ctl_set("play.at_end", std::to_string((unsigned)openmpt_at_end));
| ^~~~~~~~~~~~~~~~~~~~~~~~
2023-04-21 17:24:42 +02:00
Max Kellermann
68c36c0d3f
decoder/dsf: use PackedLE64 instead of DsdUint64
2023-03-12 20:27:05 +01:00
Max Kellermann
c472046cbb
decoder/dsdiff: use PackedBE64 instead of DffDsdUint64
2023-03-12 20:22:50 +01:00
Max Kellermann
b5eff3cecd
decoder/plugin: kludge for Android NDK r25c
2023-03-12 19:53:03 +01:00
Max Kellermann
89d66b6100
decoder/ffmpeg: check for DST codec
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1756
2023-03-12 19:39:49 +01:00
Max Kellermann
c53ee41855
decoder/ffmpeg: check for DSD codec
...
DSD uses a generic demuxer, therefore it does not appear in the
demuxer list.
2023-03-12 19:37:09 +01:00
Max Kellermann
3c798b4907
decoder/ffmpeg: query supported demuxers at runtime
2023-03-12 19:37:09 +01:00