Commit Graph

14420 Commits

Author SHA1 Message Date
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 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
Max Kellermann 6d013b092f output/osx: remove trailing newline from exception messages 2019-07-03 22:21:43 +02:00
Max Kellermann ccb182865c output/osx: fix coding style 2019-07-03 22:12:47 +02:00
Max Kellermann 412b04be58 output: allow throwing any exception 2019-07-03 22:10:26 +02:00
Max Kellermann 510e6841a0 net/AllocatedSocketAddress: import std::swap 2019-07-03 22:06:40 +02:00
Max Kellermann 2089c99348 net/{Allocated,Static}SocketAddress: use IPv[46]Address::SetPort() 2019-07-03 21:59:23 +02:00
Max Kellermann 77b5b4158c net/ToString: move UnmapV4() to class IPv6Address 2019-07-03 21:56:56 +02:00
Max Kellermann 08552f3938 net/ToString: UnmapV4() returns IPv4Address 2019-07-03 21:56:27 +02:00
Max Kellermann 2700265769 net/SocketAddress: use IPv[46]Address::Cast() 2019-07-03 21:53:42 +02:00
Max Kellermann 557098644b release v0.21.11
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl0cqqwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFErtoD/0Qmma/ltv/D7+m+ZugDLUejxJ/SGEPJNVS
 To2yy87TqwcgRcmrlwp05epxxqm54LmE8z3748iIS76zBySc4lA8OHWCNCNs0lrc
 gbUOmUM9ZE89oXppEfjLlqIofSJVLw8rY+8RMtybKeKaJ3/4JlDySMw92UuZ3LMJ
 woqAZPUOPGYsT1KBjblWsRYkn5broOZ3m2zt6e5r09ICudKQjvS6gXT3wmNqmDEU
 cos2taYNGyi42ywVJzeAPVOO/MecS+WXZIIR0y5TvslDhKkTHIo2SS1qcNM2tCdg
 c5s+vQUtZkFmKK3fr4H861cWQelRbBFY4Fy/Shrz2FMZj7eUExH/eXaxX8I7S8tX
 f0H2y944AXwlFJrIQylnSgx4x9E+ye/Mqc8O4hmSA9KHfrWDWegcbB5S2v6zt1e9
 BmiWClH5Ts1beNmT5F9nExFLZjQzxwFTsm44HJhOK+poULRo+WQLllcAsCRjNw8s
 7EzPF/UmBcydeyWYmoPhXiexAFaIDx9B+n2SlgekdvxeneXHZMskkpyysLNVde3o
 1jXH0dBdm8rj8Xp2zm9t5yjnCy2iKPO5oVdZ+keTM9olG3Er+ar5ofT78n0xbEFW
 h7PikktbqWYeF01QjfSsHO7bhOVkvLtMNLZG1gtBGMI5qUWdnC/2HbTZWRHVeAKe
 wFxdx2MBwg==
 =4kRo
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.11'

release v0.21.11
2019-07-03 15:36:45 +02:00
Max Kellermann f6125f0c35 release v0.21.11 2019-07-03 15:16:27 +02:00
Max Kellermann 44aaf51345 Merge branch 'runtime_enumeration' of git://github.com/eugene2k/MPD 2019-07-01 09:48:33 +02:00
Eugene Gorodinsky 4e2a551f30 Add runtime enumeration of supported schemas.
Fix src/ls.cxx to only print unique schemas.
Refactor src/ls.cxx to use src/input/InputPlugin functionality.

Add dynamic enumeration support to curl plugin.
2019-07-01 09:49:34 +03:00
Max Kellermann f780ac418a output/alsa: log when generating silence due to slow decoder
MPD used to do that when this code lived in the player thread, but it
was removed by commit 98a7c62d7a4f716d90af6d78e18d1a3b10bc54b3; and
the replacement code in the ALSA output plugin didn't have it.
2019-06-28 18:15:30 +02:00
Max Kellermann 61a72a5d13 output/alsa: schedule a timer to generate silence
Without this timer, DispatchSockets() may disable the
MultiSocketMonitor and if Play() doesn't get called soon, it never
gets a chance to generate silence.  However if Play() gets called,
generating silence isn't necessary anymore...

Resulting from this misdesign (added by commit ccafe3f3cf in 0.21.3),
the silence generator didn't work reliably.
2019-06-28 18:04:49 +02:00
Max Kellermann 0c0a354753 output/alsa: add a new flag "waiting" for xrun management
In DispatchSockets(), when there was not enough data, but enough for
current playback, the method would disable the "active" flag so the
next Play() call would re-enable the MultiSocketMonitor.

This was an abuse of the flag which could result in a crash
in Cancel(), because that method asserts that the period_buffer is
empty, which it may be not.

The solution is to add anther flag called "waiting" which shares some
behavior with the old flag.
2019-06-28 18:04:49 +02:00
Max Kellermann 3c5f860fb8 output/alsa: Cancel() also affects "active" (documentation) 2019-06-28 18:04:49 +02:00