Commit Graph

1673 Commits

Author SHA1 Message Date
Max Kellermann 61a3c69a06 decoder/mad: make enums strictly-typed 2019-08-02 22:49:55 +02:00
Max Kellermann 089615a01e decoder/mad: include cleanup 2019-08-02 22:49:55 +02:00
Max Kellermann b955334882 decoder/opus: ignore case in replay gain tag names
Closes https://github.com/MusicPlayerDaemon/MPD/issues/604
2019-07-29 10:40:37 +02:00
Max Kellermann f07f8f7d88 decoder/wildmidi: add fallbacks for libwildmidi<0.4
Fix build breakage from commit ea639269d8
2019-06-26 23:13:23 +02:00
Max Kellermann 39b40ac1fd decoder/wildmidi: remove unused variable wildmidi_domain 2019-06-26 23:10:20 +02:00
Max Kellermann ea639269d8 decoder/wildmidi: throw PluginUnavailable on WildMidi_Init() error
Closes https://github.com/MusicPlayerDaemon/MPD/issues/589
2019-06-26 22:40:27 +02:00
Max Kellermann 0abaa3ecc5 decoder/wildmidi: throw PluginUnavailable if config file does not exist
This makes the configuration error more visible, possibly addressing
one part of https://github.com/MusicPlayerDaemon/MPD/issues/589
2019-06-26 22:38:40 +02:00
Max Kellermann c4d3efe71d decoder/List: handle exception PluginUnavailable 2019-06-26 22:02:54 +02:00
Max Kellermann 85e82e3d4d decoder/List: annotate exceptions thrown by DecoderPlugin::Init() 2019-06-26 22:01:45 +02:00
Max Kellermann 3fae2150f5 decoder/OpusReader: return StringView
Since we now don't duplicate all items, we can easily remove the 64kB
limit from OpusReader::ReadString() and instead silently ignore and
skip all strings which are longer than 4 kB.

This fixes a tag duplication bug with Opus file containing a very long
`METADATA_BLOCK_PICTURE` tag, which occurred because the Opus plugin
returned false after parsing all tags, and then the MPD core fell back
to FFmpeg which scanned the tags again.
2019-06-05 22:19:35 +02:00
Max Kellermann 2e9f3d8b9f decoder/HybridDSD: downgrade log message to "debug"
This plugin is interesting only for a tiny fraction of MPD users, so
let's not spam everybody else's log with it.
2019-03-29 17:15:48 +01:00
Max Kellermann 1aa7cdd602 decoder/opus: fix replay gain when there are no other tags
The `tag_builder.empty()` check was wrong for the SubmitReplayGain()
call.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/497
2019-03-16 13:55:19 +01:00
Max Kellermann 7a23c123c8 decoder/List: add RAII class 2019-02-05 22:12:22 +01:00
Max Kellermann e85b24bee0 decoder/List: add noexcept 2019-02-05 22:11:51 +01:00
Jörg Krause 4f7d52dbf2 meson: add fixed-point Vorbis (Tremor) decoder support
Re-add build support for the fixed-point Vorbis (Tremor) decoder, which
was dropped when switching from Autotools to Meson.

Note, that it is not possible to build both, the Vorbis and the Tremor
decoder.

Closes: #405
2019-01-21 08:35:17 +01:00
Thomas Klausner 3a0480a482 Add missing include of stdlib.h.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/456
2019-01-15 16:52:40 +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 793fd8c479 decoder/ffmpeg: eliminate GetSampleFormat() 2018-11-04 22:36:17 +01:00
Max Kellermann 6c602811df decoder/ffmepg: fill AudioFormat from AVCodecContext, not AVCodecParameters
`AVCodecParameters` contains values from the codec detected by
avformat_find_stream_info(), but after avcodec_open2(), a different
codec might be selected with a different `AVSampleFormat`.  This leads
to misinterpretation of data returned from FFmpeg, leading to random
noise or silence.

This was observed with FFmpeg 4.0.2 and a TS container file containing
MP2.  A mp3-float codec was detected returning `AV_SAMPLE_FMT_FLTP`,
but finally the `mpegaudiodec_fixed.c` was used, returning
`AV_SAMPLE_FMT_S16`.

By using the audio format from `AVCodecContext`, we ensure that MPD
and FFmpeg always agree on the actual audio format in the buffer.

This removes the FFmpeg bug workaround from commit e1b032cbad which I
assume is obsolete after 7 years.

Fixes #380
2018-11-04 22:30:50 +01:00
Max Kellermann bd115a4008 decoder/ffmpeg: use AtScopeExit() to call av_packet_unref() 2018-11-04 22:01:33 +01:00
Max Kellermann 08272cdee2 decoder/ffmpeg: require FFmpeg 3.1 or later
Drop some compatibility code.
2018-11-04 21:55:06 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 8bb35e7bb6 decoder/Thread: reimplement HasRemoteTagScanner() using the InputPlugin list 2018-10-25 09:09:21 +02:00
Max Kellermann 9ec86acb9c decoder/Thread: enable output tags for Tidal and Qobuz
Fixes formatted paths in the `recorder` output, closing #345.
2018-10-24 16:38:26 +02:00
Max Kellermann 426bde3f75 decoder/Thread: move check to SongHasVolatileTags() 2018-10-24 16:32:41 +02:00
Max Kellermann f7141c9201 decoder/Control: convert to class, make various attributes private 2018-10-24 10:47:34 +02:00
Max Kellermann c2a2573aa5 Merge tag 'v0.20.22'
release v0.20.22
2018-10-23 20:10:57 +02:00
Max Kellermann 005e691339 decoder/fluidsynth: adapt to API change in version 2.0
Closes #360
2018-10-23 18:44:28 +02:00
Max Kellermann e28d1e0f65 decoder/mad: convert Tag** parameter to just Tag* 2018-10-22 09:44:54 +02:00
Max Kellermann a491d8ae24 decoder/mad: use class UniqueId3Tag 2018-10-22 09:44:50 +02:00
Max Kellermann 3cd5dd15f8 decoder/mad: don't initialize xing::frames 2018-10-22 09:44:48 +02:00
Max Kellermann 562ae44d38 decoder/mad: remove unused attribute from xing::magic 2018-10-22 09:44:46 +02:00
Max Kellermann 650a67dc38 decoder/mad: use mad_bit_skip() where appropriate 2018-10-19 20:24:16 +02:00
Max Kellermann c63f24e58e decoder/audiofile: larger stack buffer to reduce overhead 2018-10-19 20:04:28 +02:00
Max Kellermann 3be8b02cc2 decoder/sndfile: make vio constexpr
Use `const_cast` to be able to pass it to sf_open_virtual() which has
a wrong parameter declaration.
2018-10-19 19:51:17 +02:00
Max Kellermann bdfaea0c25 decoder/mad: move parse_id3_mixramp() to src/tag/Id3ReplayGain.cxx 2018-10-19 19:45:32 +02:00
skidoo23 69749eb591 decoder/sidplay: fix typo to avoid linker error with meson (libsidplayfp) 2018-10-16 14:56:40 +02: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
skidoo23 f80ebf68b0 decoder/wavpack: fix warning 'unused variable is_dsd' when compiled with --enable-dsd=no 2018-10-12 01:02:34 +02:00
Max Kellermann 030e603940 decoder/gme: fix include
Broken since commit 08f77c2b60
2018-10-07 22:33:52 +02:00
Max Kellermann 863722545f player/CrossFade, ...: use lround() 2018-09-22 19:08:03 +02:00
Max Kellermann d3d1d37782 AudioFormat: add TimeToSize(), SizeToTime() 2018-09-21 20:51:08 +02:00
Max Kellermann 90f4e97751 decoder/Client: use std::chrono::duration<double> instead of raw double 2018-09-21 20:42:34 +02:00
Max Kellermann c0411fa412 decoder/Thread: add noexcept 2018-09-21 17:58:34 +02:00
Max Kellermann debdf9bb96 decoder/{Thread,Control,...}: rename source files, drop prefix 2018-09-21 17:01:24 +02:00
Max Kellermann 218d9383d7 decoder/Thread: move decoder_thread_start() into DecoderControl 2018-09-21 16:57:54 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann f6b3a88723 Merge branch 'master' of git://github.com/skidoo23/MPD 2018-08-14 19:02:37 +02:00
skidoo23 82e8913c05 decoder/sidplay: support basic and kernal rom (libsidplayfp) 2018-08-12 14:25:11 +02:00
Max Kellermann 01d3777574 decoder/Thread, ...: log all exceptions 2018-08-09 11:14:40 +02:00