Commit Graph

15786 Commits

Author SHA1 Message Date
Max Kellermann
1d332746af test/run_filter: move code to WriteOrThrow() 2020-09-07 20:07:18 +02:00
Max Kellermann
f3e133c617 test/run_filter: use class FileDescriptor 2020-09-07 20:07:13 +02:00
Max Kellermann
1678a6eb59 test/run_filter: ensure that partial frames will not get passed to the filter 2020-09-07 20:07:08 +02:00
Max Kellermann
b4dc2c07d5 test/run_filter: move the buffer into the loop 2020-09-07 20:07:03 +02:00
Max Kellermann
d7838950d8 test/run_input: use WithBufferedOutputStream() 2020-09-07 20:04:13 +02:00
Max Kellermann
2e93a83dd5 test/run_input: convert pointer to reference 2020-09-07 20:02:12 +02:00
Max Kellermann
67c7116f05 Merge branch 'v0.21.x' into master 2020-09-04 18:35:21 +02:00
bitkeeper
9aa432c078 Support soxr custom recipes.
MPD uses soxr with prefined resample recipes. Soxr also support defining a recipe your self.
This commit will support a custom recipe by changing the existing quality setting to "custom".

The same structs as the predefined recipes uses can now set by hand.

This will make the following settings available:
- precision 16|20|24|28|32 bits, example "28"
- phase_response - 0-100, example "45"
- passband_end - used bandwidth of source 80-99.7%, example "99.7.0"
- stopband_begin - anti aliasing 100.0+%, example "100".
- attenuation - signal reduciton in dB's, 0-30. example "3.0".
- flags "0" - additional bitmask with extra settings

The data is set in the structs soxr_quality_spec and soxr_io_spec (found in soxr.h).
2020-09-04 18:32:03 +02:00
Max Kellermann
db8b419b8c archive/iso9660: free iso9660_stat_t as early as possible 2020-09-04 18:17:24 +02:00
Max Kellermann
990f631cbc archive/bzip2: make variables more local 2020-09-04 18:02:22 +02:00
Max Kellermann
db46d84458 archive/bzip2: move the eof check out of the ScopeUnlock 2020-09-04 18:01:29 +02:00
Max Kellermann
9e6c4f8d80 archive/bzip2: throw on unexpected input EOF
Don't silently return 0 when there is no more data, because this may
crash the caller.  And flush output even if input EOF has been reached.
2020-09-04 17:54:53 +02:00
Max Kellermann
41b47f95c5 archive/bzip2: simplify bz_stream initializer 2020-09-04 17:52:04 +02:00
Max Kellermann
15939fd87c archive/bzip2: fold Open() into constructor 2020-09-04 17:51:41 +02:00
Max Kellermann
f63c343f68 archive/bzip2: reorder fields to improve packing 2020-09-04 17:51:22 +02:00
Max Kellermann
1a516e7744 archive/bzip2: add override 2020-09-04 17:51:21 +02:00
Max Kellermann
5c9d97775f python/build/libs.py: update Boost to 1.74.0 2020-09-04 14:49:11 +02:00
Max Kellermann
64aadcd13f python/build/libs.py: update CURL to 7.72.0 2020-09-04 14:48:40 +02:00
Max Kellermann
1f6a7d6462 archive/zzip: fix crash on corrupt ZIP file
Sometimes, zzip_file_read() returns 0 even though the end of the file
was not reached.  This causes assertion failures in
DecoderBridge::Read().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/935
2020-09-04 14:34:54 +02:00
Max Kellermann
e44b953d9a archive/zzip: use zzip_ssize_t to avoid integer overflows 2020-09-04 14:33:44 +02:00
Max Kellermann
6c85020630 archive/zzip: add override 2020-09-04 14:33:44 +02:00
Max Kellermann
9d910320f3 archive/zzip: pass std::shared_ptr as template parameter
This eliminates a tiny amount of overhead because the compiler can
choose how to pass the parameter.
2020-09-04 14:33:44 +02:00
Max Kellermann
c53074efc9 archive/zzip: add explicit 2020-09-04 14:33:11 +02:00
Max Kellermann
3b51c53eca win32/build.py: add -D_FORTIFY_SOURCE=0
This fixes the Windows build.  Linking failed because some packages
(e.g. libFLAC) default to enabling `_FORTIFY_SOURCE`, which is broken
in recent mingw versions
(https://github.com/msys2/MINGW-packages/issues/5803).
2020-09-04 14:33:11 +02:00
Max Kellermann
0aa0ffb67b decoder/sndfile: allow partial reads at end of file
While libsndfile doesn't like partial reads in the middle of a file
(see commit 95ac6071b9), it allows partial reads at the end of a file.
It doesn't pay attention to the file size when issuing a read.

Commit ecb67a1ed1 (MPD 0.18.12) was a regression: previously,
partial reads at the end of a file were possible, but switching to
decoder_read_full() made this an error condition.  This way, a portion
at the end of each file was lost, leading to corruption with gapless
playback (https://github.com/MusicPlayerDaemon/MPD/issues/936).

This fix switches to the newly introduced function
decoder_read_much(), which does the same as the code before commit
ecb67a1ed1.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/936
2020-09-04 13:35:00 +02:00
Max Kellermann
33f70931dd decoder/API: add decoder_read_much() 2020-09-04 13:35:00 +02:00
Max Kellermann
8830ea319f decoder/API: add noexcept 2020-09-04 13:35:00 +02:00
Johann Uhrmann
38498d3ee2 Removed duplicate check for negative song time 2020-08-23 12:17:10 +02:00
Max Kellermann
35d1d0bc6e Merge branch 'document-no-config-option' of git://github.com/naglis/MPD 2020-08-21 14:36:04 +02:00
Naglis Jonaitis
fefdb7d96d
doc/mpd.1.rst: document --no-config option 2020-08-21 15:22:07 +03:00
Max Kellermann
1d39a35b05 Merge branch 'use-stderr-option-in-docs' of git://github.com/naglis/MPD 2020-08-21 13:59:43 +02:00
Naglis Jonaitis
902f18fcca
doc/user.rst: use --stderr option in examples
--stdout was renamed to --stderr in 7261739526.
2020-08-21 14:49:06 +03:00
Naglis Jonaitis
8145f34248
doc/mpd.1.rst: fix typo 2020-08-21 14:41:48 +03:00
Max Kellermann
ddb524b6b2 input/uring: add noexcept 2020-08-14 16:45:00 +02:00
Max Kellermann
cbcdc73f9a system/ByteOrder: add noexcept 2020-08-14 16:36:24 +02:00
Max Kellermann
4f6c54ecb3 output/osx: catch kAudioDevicePropertyHogMode errors
Our AudioObjectGetPropertyDataT() wrapper throws exception on error,
and calling it from OSXOutput::Disable() can cause MPD crash due to
std::terminate().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/932
2020-08-14 16:33:43 +02:00
Max Kellermann
2bdf1b2284 test/meson.build: add explicit dependency from run_output on libevent.a
We could exclude that feature if neither ALSA nor httpd are enabled,
but that's too complicated for this small debug program.
2020-08-14 14:40:39 +02:00
Max Kellermann
3f0805e7f6 doc/meson.build: let custom_target() install manpages
install_man() is currently broken with Meson and doesn't support a
custom target argument.

The problem with this kludge is that both mpd.1 and mpd.conf.5 are
installed in /usr/share/man/man1/, but apparently, there's no solution
yet.
2020-08-14 13:50:49 +02:00
Max Kellermann
4c93165a67 doc/meson.build: use install_man() 2020-08-14 13:18:52 +02:00
kaliko
5f63ffd86c Convert raw manpages to reStructured text
Build with `rst2man mpd.1.rst mpd.1`
2020-08-14 13:14:34 +02:00
Max Kellermann
9df2469e51 meson_options.txt: add option html_manual 2020-08-14 13:02:19 +02:00
Max Kellermann
2e73e605f7 doc/meson.build: convert option "documentation" to Meson "feature"
This allows automatic optional detection of Sphinx.  This will be
useful when we start building the manpages with Sphinx, which many
users may want to have.
2020-08-14 13:02:08 +02:00
Max Kellermann
2bcd8516ea Merge branch 'use-ref-for-ffmpeg-decoder' of git://github.com/naglis/MPD 2020-08-14 13:01:37 +02:00
Naglis Jonaitis
5c3301f9a3
doc/plugins.rst: use reference to ffmpeg plugin section
Currently, the hardcoded URL points to a non-existent page.
2020-08-14 13:51:04 +03:00
Naglis Jonaitis
f1487c30bf
doc/plugins.rst: document archive plugins 2020-08-14 13:38:31 +03:00
Naglis Jonaitis
08c70b0702
doc/user.rst: document include_optional directive 2020-08-08 16:30:27 +03:00
Max Kellermann
df1bf28caa Merge branch 'document-libmpg123-limitations' of git://github.com/naglis/MPD 2020-08-06 20:04:30 +02:00
Naglis Jonaitis
8b67ae0460
doc/plugins.rst: document libmpg123 limitations 2020-08-01 15:04:11 +03:00
Max Kellermann
dbdf782e59 net/{Resolver,HostParser}: include <cstring>
Fixup after e4dad42ca1
2020-07-23 17:40:29 +02:00
Max Kellermann
f102cbb613 net/AllocatedSocketAddress: add missing forward declaration 2020-07-23 17:40:29 +02:00