Max Kellermann
f9eff31205
decoder/mad: use sizeof(input_buffer)
2019-08-02 23:19:11 +02:00
Max Kellermann
1d74a029a2
decoder/mad: simplify variable initialization in FillBuffer()
2019-08-02 23:19:11 +02:00
Max Kellermann
6b8ca514bb
decoder/mad: fix broken log message
...
Broken since commit f8bfea8bae
2019-08-02 22:58:16 +02:00
Max Kellermann
f51e555154
decoder/mad: change "mp3_" suffix to "mad_"
2019-08-02 22:49:55 +02:00
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
52bee8f81f
util/StaticFifoBuffer: add GetAvailable()
2019-08-02 22:49:55 +02:00
Max Kellermann
adc25e648f
util/StaticFifoBuffer: add constexpr
2019-08-02 22:49:33 +02:00
Max Kellermann
31da8eac9b
util/StaticFifoBuffer: add noexcept
2019-08-02 22:49:05 +02:00
Max Kellermann
e00464435b
util/Compiler.h: move compiler version checks to meson.build
2019-08-02 15:53:16 +02:00
Diomendius
b81138bda1
Fix JACK plugin outputting only to left channel
...
The JACK output plugin would not correctly upmix mono input files when exactly 2 output ports were configured. This fixes that.
2019-08-02 15:52:20 +02:00
Max Kellermann
fe2f8c088a
Partition, ...: add noexcept
to callback methods
2019-08-02 14:44:00 +02:00
Max Kellermann
6de088140b
lib/xiph/OggVisitor: invoke OnOggPacket() with the "E_O_S" packet
...
The "end of stream" packet is not special; it contains normal data,
and thus we should pass it to OnOggPacket().
This fixes one part of https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-02 14:04:08 +02:00
Max Kellermann
86d0534638
lib/xiph/OggVisitor: more API documentation
2019-08-02 13:56:00 +02:00
Max Kellermann
af99f9fc90
pcm/Volume: convert S16 to S24 to preserve quality and reduce noise
...
Applying software volume to S16 samples means several bits of
precision are lost; at 25% volume, two bits are lost. Additionally,
dithering adds some noise.
The problem gets worse when you apply the software volume code twice:
for the software mixer volume, and again for the replay gain. This
loses some more precision and adds even more dithering noise, which
can become audible (see
https://github.com/MusicPlayerDaemon/MPD/issues/542 ).
By converting everything to 24 bit, we need to shift only two bits to
the right instead of ten, losing nearly no precision, and dithering is
not needed. Even if the output device is unable to play S24 directly,
we can convert back to S16 with only one stage of dithering.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/542
2019-07-30 20:03:37 +02:00
Max Kellermann
a784c8b1ae
net/Resolver: replace memset(0) with empty C++ initializer list
2019-07-29 11:32:06 +02:00
Max Kellermann
991bbea875
Merge branch 'v0.21.x'
2019-07-29 11:32:00 +02:00
Max Kellermann
1033dbca2b
playlist/Song: add missing includes
2019-07-29 11:31:30 +02:00
Max Kellermann
a2d2210713
ls: fix early return in uri_supported_scheme()
...
Fixes regression by commit 4e2a551f30
Closes https://github.com/MusicPlayerDaemon/MPD/issues/599
2019-07-29 11:08:47 +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
90ea3bf985
playlist/Song: support backslash in relative URIs
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/607
2019-07-29 09:58:53 +02:00
Max Kellermann
83b0871248
test/test_translate_song: remove unused variable "s1"
2019-07-29 09:52:57 +02:00
Max Kellermann
d8aec4b2dc
test/run_decoder: catch StopDecoder
...
This exception is usually thrown by class DecoderBridge, but the Opus
plugin (ab)uses it as well, so we need to catch it.
2019-07-12 17:49:12 +02:00
Max Kellermann
39b302dcad
increment version number to 0.21.12
2019-07-12 17:22:20 +02:00
Max Kellermann
426891ab31
output/Init: pass MixerType to _load_mixer()
2019-07-12 17:11:14 +02:00
Max Kellermann
b94de51ac4
system/Error: move code to IsErrno()
2019-07-12 17:11:14 +02:00
Max Kellermann
db024c27d5
output/Source: allow the ReplayGainFilter to change the AudioFormat
...
Just in case.
2019-07-08 20:16:53 +02:00
Max Kellermann
326c6ae615
pcm/Volume: add variable "dest_size"
2019-07-05 21:01:09 +02:00
Max Kellermann
5fa7610264
pcm/Volume: Open() returns output sample format
...
Prepare for a new mode which may convert to a different sample format
when applying volume, to reduce dithering.
2019-07-05 19:03:00 +02:00
Max Kellermann
1c757f8c1c
pcm/Volume: allow any exception
2019-07-05 19:01:46 +02:00
Max Kellermann
06fbbe2d7b
pcm/Volume: calculate PCM_VOLUME_1
2019-07-05 18:26:26 +02:00
Max Kellermann
21d91cb1d1
pcm/Volume: fix API documentation
2019-07-05 18:26:14 +02:00
Max Kellermann
9d3d4fc734
util/CharUtil: add noexcept
2019-07-05 18:05:04 +02:00
Max Kellermann
d6660bad03
util/WCharUtil: remove redundant inline
keywords from constexpr
functions
2019-07-05 18:03:42 +02:00
Max Kellermann
9d74b1a212
IcyMetaDataParser: include cleanup
2019-07-05 17:27:39 +02:00
Max Kellermann
54c7dc029e
IcyMetaDataParser: remove useless log message
2019-07-05 17:26:31 +02:00
Max Kellermann
d8bcdca7ff
IcyMetaDataParser: pass StringView to icy_add_item()
2019-07-05 17:17:44 +02:00
Max Kellermann
d663f81420
include cleanups (powered by iwyu)
2019-07-05 09:59:58 +02:00
Max Kellermann
9cdebc90a0
lib/icu/Compare: use StringIsEqualIgnoreCase()
2019-07-05 09:59:58 +02:00
Max Kellermann
0a267056d3
lib/icu/Compare: fix strcasecmp() call
2019-07-05 09:59:58 +02:00
Max Kellermann
4650a903b4
decoder/Bridge: add noexcept
2019-07-05 08:57:51 +02:00
Max Kellermann
94c9fafe16
lib/chromaprint/DecoderClient: catch and postpone InputStream::LockRead() errors
2019-07-05 08:36:14 +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
6c22c34300
output/oss: add noexcept
2019-07-04 22:42:19 +02:00
Max Kellermann
f54710b100
output/oss: replace enum oss_setup_result with bool
...
It's not a tri-state anymore since we introduced C++ exceptions.
2019-07-04 22:23:22 +02:00
Max Kellermann
196db1a8c8
output/oss: remove redundant DoClose() calls from Reopen()
2019-07-04 22:01:44 +02:00
Max Kellermann
d66ef7eac1
lib/alsa/HwSetup: don't reset dsd_mode
...
Fixes regression by commit 28e07e900f
Closes https://github.com/MusicPlayerDaemon/MPD/issues/596
2019-07-04 12:47:35 +02:00
Max Kellermann
0a32634d8f
output/alsa: check ring buffer space before writing to it
...
Pass only the amount of data to PcmExport::Export() when its full
output fits into the ring buffer. Using only a part of the
PcmExport::Export() result may cause data corruption because
PcmExport's internal state may contain partial blocks which would need
to be rolled back when only some of its output data was used.
As a side effect, this fixes an assertion failure because
PcmExport::CalcInputSize() considered partial block data and could
cause Play() to return a number larger than the "size" parameter.
2019-07-04 12:47:10 +02:00
Max Kellermann
b12fc3c60d
output/alsa: throw unexpected snd_pcm_writei() errors
...
If snd_pcm_writei() fails, throw an error and stop playback instead
of going into an endless busy loop.
2019-07-04 12:46:18 +02:00