Max Kellermann
4e84fa4a00
RemoteTagCache: use [[gnu::pure]]
2021-10-13 10:31:51 +02:00
Max Kellermann
78e49928b6
command/QueueCommands: disallow moving the current song relative to itself
...
This was a no-op previously, but this operation makes no sense.
2021-10-07 22:55:41 +02:00
Max Kellermann
c0bcfe244c
command/QueueCommands: reimplement relative "move"/"moveid" offsets
...
The existing implementation has been utterly broken forever; I cannot
explain what it actually does, but it doesn't do what the
documentation says.
2021-10-07 22:49:38 +02:00
Max Kellermann
e63ecd81ec
command/QueueCommands: eliminate id lookup from handle_addid()
...
Use MoveRange() instead of MoveId().
2021-10-07 22:44:06 +02:00
Max Kellermann
c47a858d15
command/QueueCommands: move code to RequireCurrentPosition()
2021-10-07 22:21:00 +02:00
Max Kellermann
076c9a0dd9
command/QueueCommands: offset relative "addid" positions by one
...
Now, "+0" means "right after the current song" and "-0" means "right
before the current song". Mnemonic: there are zero songs between the
current song and the newly added song.
2021-10-07 22:12:10 +02:00
Max Kellermann
3993176b76
command/QueueCommands: support relative offsets in "addid"
...
A similar feature was present long ago in MPD, but was deprecated in
version 0.16 because the implementation was broken. This commit
re-adds the feature in a way that's well-defined and not broken.
Close https://github.com/MusicPlayerDaemon/MPD/issues/1221
2021-10-07 21:55:56 +02:00
Max Kellermann
16cad48641
command/QueueCommands: validate the "addid" position before adding the song
...
Validate early, so we avoid the rollback if an error occurs.
2021-10-07 21:27:07 +02:00
Max Kellermann
7a6d0c2efc
command/Queue: move LookupRemoteTag() to the end
...
Skip the LookupRemoteTag() call if the MoveId() call fails.
2021-10-07 21:13:45 +02:00
Max Kellermann
f6035f2dda
util/UriRelative: use std::string_view
...
Eliminates lots of implicit std::string temporaries.
2021-10-07 14:49:53 +02:00
Max Kellermann
c34a1e29de
util/UriRelative: fix variable mixup
2021-10-07 14:44:41 +02:00
Max Kellermann
45f3dd8b7a
Revert "python/build/libs.py: remove flac, switch to Meson wrap"
...
This reverts commit 6ed4aff4d3
. The
Meson wrap is broken on non-x86, because it unconditionally includes
<cpuid.h> which is an x86 only header.
2021-10-07 13:28:17 +02:00
James D. Smith
acc1bd6297
playlist/PlaylistSong: Remove dots from playlist file paths.
2021-10-07 13:15:40 +02:00
James D. Smith
49ed9dae34
util/UriUtil: New uri_squash_dot_segments.
2021-10-07 13:14:54 +02:00
Max Kellermann
cf554d306d
LocateUri: implement UriPluginKind::STORAGE properly
...
This way, URI schemes supported by arbitrary storage plugins are
allowed.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1270
2021-10-06 20:36:39 +02:00
Max Kellermann
ef24cfa523
storage/Plugin: add "prefixes"
2021-10-06 20:14:01 +02:00
Max Kellermann
5d35983298
decoder/openmpt: catch libopenmpt exceptions in scan_stream()
...
Fixes crash bug.
2021-10-06 20:14:01 +02:00
Max Kellermann
2dacb36789
LocateUri: throw std::invalid_argument instead of std::runtime_error
...
This should translate to ACK_ERROR_ARG instead of ACK_ERROR_UNKNOWN.
2021-10-06 19:26:33 +02:00
Max Kellermann
57a1403f08
output/pipewire: implement Delay(), fix busy loop while paused
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1265
2021-09-24 11:33:35 +02:00
Max Kellermann
bad3283182
output/pipewire: add flag "active", replaces some uses of "paused"
...
This way, we know whether we're explicitly "paused" or "not yet
activated because the ring buffer hasn't been filled yet".
2021-09-24 11:33:30 +02:00
Max Kellermann
6ed4aff4d3
python/build/libs.py: remove flac, switch to Meson wrap
2021-09-21 16:44:51 +02:00
Max Kellermann
9ea1578a97
lib/expat/meson.build: propagate the libexpat dependency
...
Fixes the build with libexpat from Meson wrap.
2021-09-21 14:38:00 +02:00
Max Kellermann
520028dcfc
python/build/libs.py: remove libexpat, switch to Meson wrap
2021-09-21 14:08:23 +02:00
Max Kellermann
aef0535c55
python/build/libs.py: remove libvorbis, switch to Meson wrap
2021-09-21 13:49:50 +02:00
Max Kellermann
410b8711f2
lib/curl/meson.build: add -DCURL_STATICLIB on Windows
...
Necessary since commit 6acf81d5ae
2021-09-21 13:24:35 +02:00
Max Kellermann
6acf81d5ae
python/build/libs.py: build CURL with cmake
2021-09-21 12:30:39 +02:00
Max Kellermann
937423dbcf
event/Loop: check the quit
flag after RunDeferred()
...
Allow DeferredEvents to call EventLoop::Break().
2021-09-10 12:14:18 +02:00
Rosen Penev
40483d8478
fix wrong emplace usage
...
emplace already calls std::pair. No need for it again.
No need to emplace when calling std::make_shared.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-07 21:14:37 -07:00
Rosen Penev
6ec5089cc9
remove std::make_pair
...
make_pair is an old C++98 function that can be replaced by modern
shorter constructs.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-07 21:13:22 -07:00
Max Kellermann
bdd8c34c67
Merge branch 'move' of git://github.com/neheb/MPD
2021-08-29 06:47:05 +02:00
Max Kellermann
c9a9248c9f
java/Class: use Java::LocalObject
...
This eliminates all but one DeleteLocalRef() call.
2021-08-28 08:09:54 +02:00
Max Kellermann
31f7fede30
java/GlobalRef: remove method Set(), always require initialization
2021-08-28 08:08:30 +02:00
Max Kellermann
917fe549b0
java/Object: use type aliases
2021-08-28 08:05:57 +02:00
Max Kellermann
8e430e55af
Java/GlobalRef: add LocalRef cast constructor
2021-08-28 08:04:20 +02:00
Max Kellermann
9e61bda592
java/String: add class StringUTFChars()
2021-08-27 12:30:43 +02:00
Max Kellermann
56997290d7
io/BufferedOutputStream: add method Discard()
2021-08-27 12:06:36 +02:00
Max Kellermann
d2f84f3df8
io/BufferedOutputStream: allow specifying the buffer size
2021-08-27 12:06:20 +02:00
Max Kellermann
9da28e5c73
io/BufferedOutputStream: more API documentation
2021-08-27 12:06:02 +02:00
Max Kellermann
d1f9b06f84
io/BufferedOutputStream: add WriteT()
2021-08-27 12:05:26 +02:00
Max Kellermann
f9f3306db9
io/BufferedOutputStream: use std::size_t
2021-08-27 12:05:06 +02:00
Max Kellermann
19d19cd737
fs/io/BufferedOutputStream: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-08-27 12:04:44 +02:00
Max Kellermann
b1175acb59
util/StringView: hard-code C++17
2021-08-27 12:01:31 +02:00
Max Kellermann
672278e5fd
util/StringView: use [[gnu::]] attributes
2021-08-27 11:59:37 +02:00
Max Kellermann
da155f8822
util/StringCompare: use [[gnu::]] attributes
2021-08-27 11:58:25 +02:00
Max Kellermann
4026ef63b6
util/StringAPI: use [[gnu::]] attributes
2021-08-27 11:57:56 +02:00
Max Kellermann
b282682ba5
use using
instead of typedef
2021-08-27 11:57:33 +02:00
Max Kellermann
ad00926e1b
util/AllocatedArray: add method release()
2021-08-27 11:24:50 +02:00
Rosen Penev
0b774df375
prevent use after move
...
These should be equivalent anyway.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-26 13:38:36 -07:00
Rosen Penev
53ffcf455c
make several member functions const
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-26 13:15:52 -07:00
Max Kellermann
9ca64d5fb3
filter/Chain: eliminate, just use a chain of TwoFilters instead
...
The ChainFilter class is extremely complicated code, and will grow to
be even more complicated when the Filter interface gets extended.
Let's just remove it; we can easily chain many TwoFilters instead.
2021-08-26 17:45:23 +02:00
Max Kellermann
bd79354f32
filter/TwoFilters: add ChainFilters()
2021-08-26 17:42:25 +02:00
Max Kellermann
49dcac5c21
filter/TwoFilters: add class PreparedTwoFilters
2021-08-26 17:36:19 +02:00
Max Kellermann
38a4b0d8d5
filter/TwoFilters: fix include guard
2021-08-26 14:36:52 +02:00
Max Kellermann
a224225e48
pcm/AudioFormat: use std::size_t
2021-08-26 13:42:15 +02:00
Max Kellermann
7d7fe756b3
pcm/AudioFormat: use [[gnu::pure]]
2021-08-26 13:42:15 +02:00
Max Kellermann
1cb7fe12ff
pcm/AudioFormat: add noexcept
2021-08-26 13:37:36 +02:00
Max Kellermann
8a29805767
release v0.22.11
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmElU1oQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEnfUD/0fmlPB0ud6UdyedOp6yqbZoWvUanGFyrFX
4eaTfSZq4qAs3JKSLqGVcseDNG4wk/VkDhXekbpFPIgCjBQpypxusQ1NowoT6gps
NYFClU2cxBnGYHMZQeTT+4WB4VRGreZGJ42IfQbKDyrSNImKu+5CmtDvsoGezeMK
OnL9EkNR3D7nl6uIUstuyOG6f/x1QNNVlntatslMxPYfnrZgHElwZiodqEGDh0c4
XxBQmVyAX+AGjmwepXTQvUap2rd2x0mW7jQ7C3FFTP/eSImPsspQb4zO/TGnp3/o
9pSIDUSlnOS78C3GIJCZB4ac7i/Gh+tSV6Y3wSJmY9s/EvqnnHwySeiJnTLG3q3G
03Wy7r64enytU3jdgjtYb3h8fCnsQjhuhmUXtDLTF3hFeBR/EkviYQOpGqVbXpzm
Wx+yINtHJcUr4jikxboFSQacmf2WbJbIyZ3RhsWTWANHWDqHrMzW73E850Dg3kg3
RoeMKV3B9vFv6kolsCZR/Pq6+vFSsuDt8o+/RJqBwSKKwPP9Hm7ntlamTsJ5kA/0
kvr5WE9RcDOU+lyTjra1OW7OInxbhr05PFNBw8GfeR9QyatUT6c3hgyhoCbZ24DV
oPh3TwKrwtm82TMxBktGMAWb02RebEYVpPSlVrnWhpI9vlm4gHebAxANbFVWA/ur
FxQv+PXg0w==
=G8gT
-----END PGP SIGNATURE-----
Merge tag 'v0.22.11'
release v0.22.11
2021-08-24 22:19:38 +02:00
Max Kellermann
263d1ba002
Main: playlist_directory defaults to "/sdcard/Android/data/org.musicpd/files/playlists"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1233
2021-08-24 22:12:27 +02:00
Max Kellermann
2dba06dc34
android/Context: add GetExternalFilesDir()
2021-08-24 22:03:53 +02:00
Max Kellermann
811860c3b4
android/Context: use [[gnu::pure]]
2021-08-24 21:54:22 +02:00
Max Kellermann
8439119e24
filter/ffmpeg: support double-precision samples
...
Insert an "aformat" filter which converts double-precision to
single-precision.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:45:57 +02:00
Max Kellermann
b5b40d8235
filter/ffmpeg: automatically retry with "aformat"
...
If DetectFilterOutputFormat() fails to determine the output format,
insert an "aformat" filter which attempts to force a specific output
format.
Fixes part 2 of of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:31:13 +02:00
Max Kellermann
b904f8af03
lib/ffmpeg/Filter: add FilterContext::MakeAformat()
2021-08-24 13:30:17 +02:00
Max Kellermann
ebfbb74f9e
lib/ffmpeg/DetectFilterFormat: return AudioFormat::Undefined() on EAGAIN
2021-08-24 13:30:03 +02:00
Max Kellermann
7b4225aa1f
lib/ffmpeg/Filter: add ParseSingleInOut()
...
Merge some duplicate code.
2021-08-24 13:29:08 +02:00
Max Kellermann
71a5311b06
lib/ffmpeg/Filter: eliminate class FilterContext
...
Since AVFilterContext are freed automatically, this wrapper class
serves no purpose. Let's remove it.
2021-08-24 13:04:34 +02:00
Max Kellermann
a62a35e1db
lib/ffmpeg/Filter: remove FilterContext destructor
...
Fixes potential double-free bugs which currently did not occur because
the destructors happened to be called in the right order.
2021-08-24 12:56:05 +02:00
Max Kellermann
ca2439f595
filter/ffmpeg: pass "channel_layout" instead of "channels" to buffersrc
...
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-23 21:38:13 +02:00
Max Kellermann
34aa67ea87
Merge remote-tracking branches 'neheb/6', 'neheb/5', 'neheb/3', 'neheb/2' and 'neheb/1'
2021-08-23 20:36:26 +02:00
Dave Hocker
18be8c3318
Fix compile error on macOS 11.15.2 (introduced by commit 30e3ef4
)
2021-08-21 11:16:22 -05:00
Rosen Penev
1d7a8f992f
clang-tidy: use auto
...
The type is duplicated otherwise
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-21 00:53:23 -07:00
Rosen Penev
da1783cdff
clang-tidy: remove pointless const
...
Found with readability-const-return-type
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-21 00:51:21 -07:00
Rosen Penev
20d74bb07e
clang-tidy: replace loop with std::all_of
...
Found with readability-use-anyofallof
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-21 00:49:36 -07:00
Rosen Penev
0f7a0b04ca
replace loop with find_if
...
loop is wrong anyway. It's missing a break;
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-21 00:48:30 -07:00
Rosen Penev
40c6a214e3
unique_ptr/new to make_unique
...
The latter is easier to read and is the "correct" thing to do.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-20 23:54:14 -07:00
Samir Benmendil
cfe024ea13
command/file: return directory_uri if real_uri is unset
...
Prevent a segfault when accessing album art.
Fix #1224 #1225
2021-08-17 10:55:43 +02:00
Max Kellermann
bedcf1cce5
Merge branch 'exp2' of git://github.com/neheb/MPD
2021-08-17 10:53:36 +02:00
Rosen Penev
30e3ef4c8e
constexpr/std::array conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-16 21:05:56 -07:00
Rosen Penev
4c5fea96e4
constexpr global variable conversion
...
Found with cppcoreguidelines-avoid-non-const-global-variables
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-16 20:58:21 -07:00
Rosen Penev
46600931e4
clang-tidy: use default
...
Found with modernize-use-default
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-16 20:48:28 -07:00
Max Kellermann
a2387210bf
time/FileTime: move code to SystemClock.hxx
2021-08-10 19:53:53 +02:00
Max Kellermann
d7e7adb496
time/FileTime: add ChronoToFileTime()
2021-08-10 16:16:15 +02:00
Max Kellermann
45354a421c
time/FileTime: preserve the FILETIME resolution
...
Don't truncate the FILETIME to second resolution to pass it to
std::chrono::system_clock::from_time_t(); instead, calculate the
offset between the FILETIME epoch and the
std::system_clock::time_point epoch, and use that to initialize the
time_point directly.
2021-08-10 15:16:59 +02:00
Max Kellermann
9fc3c60910
time/FileTime: add FileTimeToChronoDuration()
2021-08-10 15:13:22 +02:00
Max Kellermann
1976003e91
time/FileTime: allow negative times
2021-08-10 15:13:16 +02:00
Max Kellermann
488afc47d4
time/FileTime: use uint_least64_t
2021-08-10 15:12:49 +02:00
Max Kellermann
f3d67115d7
output/wasapi: check ENABLE_DSD before setting dsd_mode
2021-08-10 15:00:58 +02:00
Max Kellermann
0dacde32f2
output/pipewire: append output name to PW node name
2021-08-10 11:30:25 +02:00
Max Kellermann
528e05f025
output/pipewire: add config option "remote"
2021-08-10 11:28:29 +02:00
Max Kellermann
269583f5dd
output/pipewire: allow specifying a target by its name
2021-08-10 11:17:16 +02:00
Max Kellermann
7c9f4f7e4f
output/pipewire: create inactive stream, fill ring_buffer first
...
This avoids underruns at the start of playback.
2021-08-10 10:50:42 +02:00
Max Kellermann
00fd692eba
output/pipewire: wait for buffer to fill before resuming
2021-08-10 10:48:25 +02:00
Max Kellermann
668c3782b2
output/pipewire: smaller ring buffer, 500ms should be enough
2021-08-10 10:43:56 +02:00
Max Kellermann
1e0af2dadf
output/pipewire: add type alias for boost::lockfree::spsc_queue
2021-08-10 10:43:54 +02:00
Max Kellermann
4ea2ea2a52
output/pipewire: update nbytes
after calling PcmSilence()
...
This was missing in commit 8a243e6e28
2021-08-10 10:43:28 +02:00
Max Kellermann
8a243e6e28
output/pipewire: call pw_stream_flush() only if really draining
...
If draining was not requested, generate silence instead if there is no
data in the ring buffer.
The problem is that pw_stream_flush() appears to disable the stream
permanently, even though there is no state_changed callback - the
stream state remains at PW_STREAM_STATE_STREAMING, but the stream is
defunct. I have no idea why and I havn't found any documentation
about it.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1219
2021-08-10 06:30:58 +02:00
Max Kellermann
d33aa01000
output/pipewire: reset the "paused" flag
...
This was missing in commit 4d1ce7023b
2021-08-09 19:31:22 +02:00
Max Kellermann
bd893e6336
release v0.22.10
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmENYHwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEpGtD/9ToU27x36NAAFpChicSqbu3h2wtJ29lowT
ivV80XB26pQeGK0DSXADSs38MVXo42i3vqg0zGWV9TRbcDs5VErXANVLN16qsKCu
U0v1BDY11UiYp6ATiUjIahyG1UsmbRVZlfDyVIhYvmFpGLFw6+03HH6w2k/v85ns
FxyXkYDYcUokPJPEQcChE1eIwKsGM6MjbdVIkJAEo3wGhL/Hhy2KUskrFcCo1PDj
7xxGrwauG+8wSjAWMA5vzl3udRaDauuXztm5QbQIDdsbRaCiBAdgkzC0PvIxTOr0
bR4WHVB0KSiM96yIXNtg/WZxO0XrxppmX/E4eZSgz0JGKMrAHcoTJAUCIDu3X719
gJnJLg7r2X5dTchXezv09YoJolKbw1bOooyAuE4FCDWMsOa2GRuBZC+8w7DNTZuo
PTh+Z40fnfpNBofe+e/WZrXr6i2TKk8CqHEidq2GHlOkvTR7g6m8MjOLvZNHotMb
9ECr9MhzXH+nvEX8IaxvjWsfLJiDbUgnVsQ+6akGtkbragaDN/Wgr/XdkELoLlsK
LZFY5ngnZmDXOu4tjBLJtfrTkZB2/Hld4xtF1qlsy9fvZBRKeKlpABTLaa8r/vnR
Ta0rB2O3/dculZbHZRUnZvLS4Xv4g322vW9Wso9IBoWRn9fC8b2zR93k7breAqcn
pKbYGg/j6g==
=/954
-----END PGP SIGNATURE-----
Merge tag 'v0.22.10'
release v0.22.10
2021-08-06 18:21:59 +02:00
Max Kellermann
04eb911a51
mixer/alsa: use cached values to work around rounding errors
...
This replaces 967af60327
with a more
effective workaround.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/822
2021-08-06 18:16:37 +02:00
Max Kellermann
351b39e0c5
mixer/alsa: skip the snd_mixer_handle_events() call in alsa_mixer_elem_callback()
...
snd_mixer_handle_events() has already been called by
DispatchSockets(). This way, we can also skip the exception handler.
2021-08-06 18:03:36 +02:00
Max Kellermann
3b6d4e6673
mixer/alsa: move alsa_mixer_elem_callback() into the AlsaMixer class
2021-08-06 18:01:19 +02:00
Max Kellermann
e8f328d8ad
mixer/alsa: move code to GetPercentVolume()
2021-08-06 17:56:30 +02:00
Max Kellermann
5f5b5f63af
mixer/alsa: move code to NormalizedToPercent()
2021-08-06 17:55:59 +02:00
Max Kellermann
ad6e303047
mixer/alsa: move code to GetNormalizedVolume()
2021-08-06 17:53:45 +02:00
Max Kellermann
1985786ed2
db/simple: prune CUE entries from database for non-existent songs
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1019
2021-08-05 20:26:21 +02:00
Max Kellermann
8e0d39ae94
db/update/Playlist: prepend "../" only for relative URIs
...
Prepending "../" to absolute URIs would break them.
2021-08-05 20:19:33 +02:00
Max Kellermann
1761fb14af
fs/Traits: add PathTraitsUTF8::IsAbsoluteOrHasScheme()
2021-08-05 20:09:06 +02:00
Max Kellermann
ef2fc4e6f6
db/simple/Directory: remove obsolete API doc
2021-08-05 19:05:03 +02:00
Max Kellermann
b979245d6c
decoder/Bridge: call UpdateStreamTag() only if there is no pending seek
...
If UpdateStreamTag() gets called while an initial seek is pending, the
result will never be submitted to a MusicChunk. By avoiding the
UpdateStreamTag() call in that case (by moving UpdateStreamTag() to
after the PrepareInitialSeek() check), the song_tag is preserved until
UpdateStreamTag() is called again from SubmitData().
This fixes missing tags in the "httpd" output.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1137
2021-08-05 18:02:45 +02:00
Max Kellermann
a74b07728e
tag/Tag: add Merge() which takes Tag pointers
2021-08-05 17:36:14 +02:00
Max Kellermann
7d69cbbda7
tag/Tag: Merge() returns Tag, MergePtr() returns std::unique_ptr<Tag>
2021-08-05 17:32:23 +02:00
Constantin Fuerst
955502f881
output/oss: enable DoP
...
Explanation
This adds support for DOP using the PcmExport function if the macro
ENABLE_DSD is defined. If enabled within the config-file using "dop",
the boolean dop_setting will be true. If DSD input is encountered and
the setting is on, it is checked whether the oss-device supports the
required samplerate. If that is the case, dop_active is set to true
and conversion of the input is prevented. If the sample rate is not
supported, conversion to S32 is requested. When playing back, the
PcmExport is used to pack the incoming stream into PCM. Reasoning
This is required for OSs without the required driver support for
native DSD playback that also have no ALSA. Mainly *BSD users are the
target audience for this functionality, as ALSA here is only a proxy
without full functionality. Requirements
DAC that supports the DOP standard
Building with OSS, DSD and S32-Format
Supported Formats / Required PCM Formats
DSF, DFF and WavPack-DSD will work.
DSD64, 1 Channel -> S24:176.4kHz (untested, lack of time / missing samples)
DSD64, 2 Channel -> S24:352.8kHz
DSD64, 4 Channel -> S24:705.6kHz (untested, lmissing equipment)
DSD128, 1 Channel -> S24:352.8kHz (untested, lack of time / missing samples)
DSD128, 2 Channel -> S24:705.6kHz
DSD256, 1 Channel -> S24:705.6kHz (untested, lack of time / missing samples)
Changes
inclusion of required files
adding new domain for logging
adding dop_satisfied private function
adding required member variables for storing dop state and for dop-packing
adding dop boolean parameter to many functions that are required to act a little differently when dop is active
Testing
This has been tested to work with a Sabaj Da2 on FreeBSD, where the
red status indicator LED clearly shows that DSD playback is taking
place, instead of purple for "hi-res" which is seen when converting.
Issues
I have not tested this with S24 and right now AFMT_S32_NE is
required. If not defined, ENABLE_DSD will be undef'ed. This will be
addressed in a bit, however no DAC which supports DOP but not 32Bit is
known to me. Also, AFMT_S32_NE is not defined when building on FreeBSD
which is why this is just blatantly defined in the file at the moment.
Additionally, the new dop-option is not added into any documentation
whatsoever.
2021-08-05 16:21:43 +02:00
Max Kellermann
dee5d1b87b
output/oss: replace the AudioFormat field with 3 raw OSS integers
...
This simplifies Reopen().
2021-08-05 16:03:53 +02:00
Max Kellermann
d42342e0ba
output/oss: check returned value in oss_try_ioctl()
2021-08-05 15:53:30 +02:00
Max Kellermann
8da3f8c6a7
output/oss: oss_try_ioctl() throws on EINVAL
...
Eliminate some duplicate code.
2021-08-05 15:47:11 +02:00
Max Kellermann
c8c553c75c
pcm/Export: add method IsDopEnabled()
2021-08-05 15:35:11 +02:00
Max Kellermann
c97aabe43a
Merge branch 'v0.22.x'
2021-08-05 15:17:07 +02:00
Max Kellermann
17b0ac75ca
output/oss: always enable PcmExport for alsa_channel_order
...
We need this even when AFMT_S24_PACKED is not available, for the
correct channel order in multi-channel files. Internally, MPD uses
FLAC channel order, but OSS uses the same channel order as ALSA.
2021-08-05 15:11:54 +02:00
Max Kellermann
bde64a13e2
tag/Builder: do not acquire tag_pool_lock if TagItem list is empty
2021-08-05 14:32:58 +02:00
Max Kellermann
96875921b7
tag/Builder: use std::swap() in move operator
...
This way, we save the overhead for acquiring the tag_pool_lock.
2021-08-05 14:28:37 +02:00
Cebtenzzre
551c941b5a
tag/Builder: don't ignore the result of tag_pool_dup_item
...
Also, use RemoveAll() instead of directly clearing TagBuilder::items in
most cases, as its elements represent references that must be released.
Closes #1023
2021-08-05 14:25:55 +02:00
Cebtenzzre
624c77ab43
tag/Builder: another missing RemoveAll() call
2021-08-05 14:25:05 +02:00
Cebtenzzre
ba13b4b5d6
tag/Builder: use RemoveAll() to give up references
2021-08-05 14:23:48 +02:00
Cebtenzzre
4b2d9e544c
tag/Pool: add [[nodiscard]]
2021-08-05 14:20:59 +02:00
Max Kellermann
97c43954e8
input/tidal: remove defunct unmaintained plugin
...
This plugin has been defunct for several years. Tidal has not ever
replied to any of my emails, so they're apparently not interested in
MPD support.
2021-08-05 13:52:05 +02:00
Max Kellermann
b77acd35f7
output/winmm: fix struct/class mismatch
2021-08-05 11:40:47 +02:00
Max Kellermann
968624035c
mixer/pipewire: new plugin
2021-08-05 10:57:37 +02:00
Max Kellermann
b838bf3109
output/pipewire: un-inline StateChanged()
2021-08-05 10:48:17 +02:00
Max Kellermann
4d1ce7023b
output/pipewire: implement Pause()
2021-08-04 17:26:54 +02:00
Max Kellermann
52577ac87a
output/pipewire: implement Cancel() properly
2021-08-04 17:24:49 +02:00
Max Kellermann
9fa3984a2f
input/icy: adjust offset at end of stream in Read()
...
ProxyInputStream::Read() assigns the `offset` field, which is the
wrong offset because it does not consider Icy metadata removed from
the stream. Therefore, after every ProxyInputStream::Read() call,
IcyInputStream::Read() needs to override this offset. This was
missing at the end of the stream, when Read()==0.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1216
2021-08-02 16:40:04 +02:00
Max Kellermann
239698cb5a
output/pipewire: set channel positions
2021-07-30 15:55:37 +02:00
Max Kellermann
e55de6e9f0
output/pipewire: implement Drain()
2021-07-30 15:28:01 +02:00
Max Kellermann
cfaf2ed03c
output/pipewire: move code to CheckThrowError()
2021-07-30 15:24:20 +02:00
Max Kellermann
6015960871
output/pipewire: reset the "interrupted" flag in Cancel()
...
This fixes seeking.
2021-07-30 15:20:32 +02:00
Max Kellermann
26328cc915
output/pipewire: detect connection errors
2021-07-30 14:31:06 +02:00
Max Kellermann
cd512f0b40
output/pipewire: replace usleep() with with pw_thread_loop_wait()
2021-07-30 14:31:04 +02:00
Max Kellermann
be14dd59a8
output/pipewire: remove obsolete TODO comment
2021-07-30 13:50:55 +02:00
Max Kellermann
97e5787ff7
output/pipewire: call libpipewire only while holding the lock
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1210
2021-07-30 13:49:22 +02:00
Max Kellermann
6975d3ca4b
output/pipewire: switch from pw_main_loop to pw_thread_loop
...
We need this for pw_thread_loop_lock().
2021-07-30 13:42:59 +02:00
Max Kellermann
cdca27e6bb
decoder/Bridge: fix libfmt string
2021-07-30 13:32:27 +02:00
Max Kellermann
5355335f19
db/simple/ExportedSong: check src.OwnsTag(), not this->OwnsTag()
...
this->OwnsTag() accesses fields that are not yet initialized.
2021-07-30 13:10:09 +02:00
Sam Bazley
5b775ca5b4
decoder/ffmpeg: check if long_name is not null
2021-07-28 16:05:15 +01:00
Jacob Vosmaer
ea95da3b1a
archive/meson.build: add missing libfmt dependency
2021-07-26 23:26:07 +02:00
Sam Bazley
57687779be
Android: add option to pause MPD when headphones disconnect
2021-07-26 19:02:47 +01:00
Max Kellermann
64fa76c568
command/file: support "albumart" for virtual tracks in CUE sheets
...
Instead of checking for "cover.jpg" in the virtual directory
representing the CUE sheet, check its enclosing directory.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1206
2021-07-16 09:04:35 +02:00
Max Kellermann
19a44076cf
command/file: pass directory uri to read_stream_art()
2021-07-16 08:31:58 +02:00
Max Kellermann
809a18913a
fs/Traits: add overload GetParent(string_view)
2021-07-16 08:30:34 +02:00
Max Kellermann
5eab2d96f4
output/winmm: fix struct/class mismatch
2021-07-16 08:30:34 +02:00
Khem Raj
d39b11ba5d
include <utility> for std::forward
...
Fixes
../git/src/Log.hxx:121:42: error: no member named 'forward' in namespace 'std'
LogFormat(LogLevel::ERROR, e, fmt, std::forward<Args>(args)...);
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-06-29 19:34:28 -07:00
Max Kellermann
b29a43b4d7
decoder/mad, ...: more libfmt logging
2021-06-25 20:52:08 +02:00
Max Kellermann
f60a42e0b6
Log, client/Response: adapt to libfmt 8.0.0 API changes
2021-06-25 20:29:25 +02:00
Max Kellermann
85b0029ba2
meson.build: add missing dependencies on libfmt
2021-06-25 20:28:54 +02:00
Max Kellermann
0e0f46a1e0
Log: remove unused Format functions
2021-06-24 21:40:12 +02:00
Max Kellermann
6f539cfcd6
Partition, ...: use libfmt for logging
2021-06-24 21:40:11 +02:00
Max Kellermann
0185d58a2b
Log: add libfmt support
2021-06-24 21:14:42 +02:00
Max Kellermann
d7df5e1c90
LogBackend: pass std::string_view to Log()
2021-06-24 13:43:13 +02:00
Max Kellermann
e4e4576a39
release v0.22.9
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmDTg80QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFErvaD/93cfFvY/E9NZbI7XmuEfrfX0dUEo2dd8bi
O1tbEU+8uquNLV5cyb5iEpu6RCbAQxjj8clqVuMgfl0Qe3NQ+Z+nyOg0YVEB4Z16
cQBDFGawth7HuaqBIdMgnoapUxyGW3KMFw6si5OsV5AMkT5ybdsWg3sOXIXG+cLa
7KoIwVlgum+DsAPCSKis9fiuZJCnsg9SVcsJnpoaa7ZVOASPp1Wd7F9Kv6wj03/R
fEQ3z/s/4ILsWmZFHnclFq5LSpNvom5fAiedO15WVsJCxoZHEAg0ZpnNn/whU1HA
fciGImrjHLCTKVS5xpWNXUMaov2k7LEbLka2AqYwdeuxf7kAeoZC42H/cwK6tH/F
xuNWg4l9DZQUoGFxN4hfxJi3fsVpx0+3FR+cJQWOuUtwcmh4e7qJKX1gxAjHvEQY
GPS+jx7ndpcVDJyupvhFVGT0VDEOP7yMTjdY6uc5dXa4Ulx59duvgTdEyYgS4feM
BqNOYkD2FXnN7nv56f23q5SkRHF5D5nnoc8robIWkng9PXoq1Faq42MwLFxyCdH1
duRHk06FaFYpPv7gYagarFYIwOKCteL8aOwLymYbJop0O8ripYVQ7hHcEeWNvV+f
Q1ggllNBD/igvom6tRNl+S7TeQijr44M3/pDvDI3oXJPCfh1ZFGjwKqKqS76JfEu
v4V1N0rseA==
=p1U2
-----END PGP SIGNATURE-----
Merge tag 'v0.22.9'
release v0.22.9
2021-06-23 21:02:06 +02:00
Max Kellermann
5019bdcd52
TagAny: invoke ScanGenericTags() on remote files
...
This fixes reading ID3 tags on remote files with the commands
"readcomments" and "readpicture".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1180
2021-06-23 20:49:30 +02:00
Max Kellermann
175d2c6d29
Main: use AtScopeExit() to call ZeroconfDeinit()
...
Make sure that ZeroconfDeinit() gets called even if startup fails with
an exception. Fixes an assertion failure because an Avahi TimerEvent
is still active.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1192
2021-06-22 20:31:45 +02:00
Rosen Penev
6af7be4a45
add constexpr
...
Found with cppcoreguidelines-interfaces-global-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-31 13:45:39 -07:00
Max Kellermann
ac59ec34f9
decoder/ffmpeg: fix build failure with FFmpeg 3.4
...
av_demuxer_iterate() was added in libavformat 58.9.100.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1178
2021-05-31 18:10:06 +02:00
Max Kellermann
82da57b7ce
decoder/ffmpeg: suppress -Wunused with libavformat<58.6.100
2021-05-31 16:49:48 +02:00
Max Kellermann
aa6dac9bd2
db/proxy: suppress -Wunused with libmpdclient<2.12
2021-05-31 16:49:08 +02:00
Rosen Penev
220d2bf026
clang-tidy: add explicit deleted constructors
...
Found with cppcoreguidelines-special-member-functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:47:20 -07:00
Rosen Penev
9ef1cf15a9
clang-tidy: default virtual destructors
...
Found with cppcoreguidelines-special-member-functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:46:46 -07:00
Max Kellermann
679b3bc00f
output/print, command/player: print bool as integer
...
Fixes protocol breakage after commit 0440c41cba
libfmt is too clever for the MPD protocol!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1175
2021-05-28 18:02:00 +02:00
Max Kellermann
36410daaa4
queue/PlaylistEdit: fix inverted check
...
Regression by commit 471c37be59
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1135
2021-05-28 13:56:01 +02:00
Max Kellermann
38bfef7d0b
Merge branch 'add-openmpt-decoder' of git://github.com/GrimReaperFloof/MPD
2021-05-28 13:53:43 +02:00
GrimReaperFloof
724754f16c
Fix std::to_string warning for booleans in openmpt decoder
2021-05-27 20:47:45 +02:00
Max Kellermann
4d32454697
android/LogListener: pass formatted message to OnLog()
2021-05-27 16:21:36 +02:00
Max Kellermann
4db882f666
android/LogListener: cache the jmethodID
2021-05-27 16:14:43 +02:00
Max Kellermann
a83bf97b98
android/LogListener: un-inline the constructor
2021-05-27 16:13:22 +02:00
Max Kellermann
262e1957b7
lib/icu/Converter: use libfmt
2021-05-27 16:09:56 +02:00
Max Kellermann
792411384d
protocol/ArgParser: add function MakeArgError()
...
Replaces FormatProtocolError().
2021-05-27 16:01:44 +02:00
Max Kellermann
78b0ff83e8
client/Response: include cleanup
2021-05-27 15:59:06 +02:00
Max Kellermann
23613355f3
client/Response: remove unused method FormatV()
2021-05-27 15:16:35 +02:00
Max Kellermann
0d97eba7a5
client/Response: refactor FormatError() to use libfmt
2021-05-27 15:15:47 +02:00
Max Kellermann
18efda719e
client/Response: remove unused method Format()
2021-05-27 15:14:54 +02:00
Max Kellermann
42239a30eb
client/Response: use Fmt() in FormatError()
2021-05-27 15:05:42 +02:00
Max Kellermann
a26bf261a9
input/last: call Close() in Open()
...
Prevents a possible bug which occurs when the caller-provided open()
function throws; then the "uri" field is never set.
2021-05-27 14:04:28 +02:00
Max Kellermann
c692286c67
input/last: clear "uri" field in Close()
...
Prevent false negative after the stream was closed automatically after
20 seconds.
2021-05-27 14:03:33 +02:00
GrimReaperFloof
6f64fa070d
Add repeat count setting to openmpt decoder
2021-05-26 23:43:38 +02:00
GrimReaperFloof
dc5b9d989b
Backwards compatibility with older libopenmpt versions than 0.5
2021-05-26 23:43:38 +02:00
GrimReaperFloof
9e407f5989
Change WritableBuffer<uint8_t> to AllocatedArray<std::byte>
2021-05-26 23:43:38 +02:00
GrimReaperFloof
fec6aac0f1
Code deduplication: move mod_loadfile() into ModCommon.cxx
2021-05-26 23:43:38 +02:00
GrimReaperFloof
541c31c879
Add openmpt decoder plugin
2021-05-26 23:43:38 +02:00
Max Kellermann
4ee0a06e18
Merge branch 'v0.22.x'
2021-05-26 13:15:29 +02:00
Max Kellermann
38e24208f6
decoder/ffmpeg: support the tags "album-sort", "artist-sort"
2021-05-26 13:04:47 +02:00
Max Kellermann
fbaedf2262
decoder/ffmpeg: support the "sort_album" tag
...
From libavformat/mov.c.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1173
2021-05-26 13:03:47 +02:00
Max Kellermann
8f3341cefb
decoder/ffmpeg: add comment
2021-05-26 13:03:41 +02:00
Max Kellermann
4ec4bab3a9
decoder/ffmpeg: remove "year" tag
...
This mapping was added 11 years ago in commit 766b9fd453
, but FFmpeg
doesn't appear to support it.
2021-05-26 13:03:27 +02:00
Max Kellermann
6d567bcd35
decoder/ffmpeg: fix ArtistSort and AlbumArtistSort mapping
...
These were added 11 years ago in commit 766b9fd453
, but I cannot find
any evidence in the FFmpeg repository that these names were ever
supported. This commit adds the tags as they are currently present in
libavformat/mov.c.
2021-05-26 13:03:26 +02:00
Max Kellermann
4f75eb9bfe
output/pipewire: remove unreachable "return" statement
2021-05-26 11:57:57 +02:00
Max Kellermann
d2bd12822f
Merge branch 'v0.22.x'
2021-05-26 11:57:41 +02:00
Max Kellermann
363d9f0180
db/update/Walk: load all .mpdignore files of all parent directories
...
When updating everything, this did work, but if updating only a
subdirectory, the ".mpdignore" in the parents were not used.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1172
2021-05-25 22:42:44 +02:00
Max Kellermann
db0682a469
db/update/Walk: move code to LoadExcludeList()
2021-05-25 22:38:01 +02:00
Max Kellermann
7a6823dcdf
zeroconf/AvahiPoll: the struct timeval is an absolute time point
...
Fixes broken libavahi-client timeouts.
2021-05-25 22:25:45 +02:00
Max Kellermann
bce144a232
zeroconf/AvahiPoll: move code to Schedule()
2021-05-25 22:23:55 +02:00
Max Kellermann
0cef84cac6
zeroconf/AvahiPoll: rename "timer" to "event"
2021-05-25 22:23:55 +02:00
Max Kellermann
8c690fb737
decoder/mad: move variable declaration into "case"
2021-05-25 21:34:09 +02:00
Max Kellermann
dad1c21b59
zeroconf/avahi: move variable declaration into "case"
2021-05-25 21:34:09 +02:00
Max Kellermann
3488a47c41
subprojects/sqlite3.wrap: add SQLite wrap
2021-05-25 20:51:03 +02:00
Max Kellermann
fd82d67678
sticker/Database: pass NarrowPath to sqlite3_open()
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1171
2021-05-25 18:45:45 +02:00
Max Kellermann
e66c12105b
lib/sqlite/meson.build: add missing external dependency on libsqlite
2021-05-25 18:41:43 +02:00
Max Kellermann
8a9d678bac
Merge branch 'v0.22.x'
2021-05-25 18:21:42 +02:00
Namkhai B
dbe12a6b90
util/RuntimeError: Disable format-security for gcc
...
Fixes building under GCC 11
2021-05-25 18:19:19 +02:00
Max Kellermann
0440c41cba
client/Response: add method Fmt() based on libfmt
2021-05-25 16:01:56 +02:00
Max Kellermann
0e49de867d
input/last: add nullptr check to Open(), fixes assertion failure
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1168
2021-05-22 17:33:25 +02:00
Max Kellermann
d3576a1b71
input/last: add nullptr check to Open(), fixes assertion failure
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1165
2021-05-21 19:30:36 +02:00
Max Kellermann
96707c0426
release v0.22.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmClOSYQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEkODD/49e950HLmZE8x3rmyeEEsgdvHkOVpPlKHo
+wsmSsi+N0sQKgEOffSYyL0MRWaQqzRMnl1EcEVErCfQl5f1mOw9+TL4f5ZEjVNw
CQFMy1awHtCfktgF5zq6NzXD3nor9mkjiP733x/kGcsxwfk/Y4radqUBKJ5Y4a2B
YSg35a/YTOfLCmb9WBquwAi22x7AkyBzyrY3ToCzynVuaNcT3gvLsAAMFzRUKpqD
QEoCtUxJ4CQayjWjtG/bBCs2TVSmJvovhM2xB4Jnm+MeZz+bKI0y+ALW2Wk0Agnd
qxDqyCEnvHi5pf8i9usl4/A63VDC7HHj9kDSLtPLGTijv+7Wvvr4kNpwm2DuJ4q1
1pOEgT480ryK1FPyO6XnYCk616NqjgMbplr6SQ1DuVpIddWdiGARoge/WiNvsbT9
pnEp0q9V3cQmuJ30LlskMJHAPyrE3KSrO1s+4P2zUeirwnMnOCPdq+gT+lRw4GNG
OqLFEDHaELgSaZxInCN8RCXdLMrpuvKm+FQQApU1KwbYPXIassR14yt6BPpjxqea
vkvFLtpwFWthNPLkujak5rDqAPvbHzAeOfaOiZelzd21nl/1omiMXSXRcJkEjONi
JC5VWJpi1PHMXocq6AcOQT/9XhIH4uDA+Xghn7CURBTB6WoB954TSmuVIjXTfgAv
XQYqRR+7Yw==
=Gtzo
-----END PGP SIGNATURE-----
Merge tag 'v0.22.7'
release v0.22.7
2021-05-19 18:43:19 +02:00
Max Kellermann
466a05bc52
CommandLine: update copyright year in --version output
2021-05-19 18:09:38 +02:00
Max Kellermann
6de4064cca
client/Response, command/file: use %lu instead of %zu on Windows
...
Fixes -Wformat warnings.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:06:40 +02:00
Max Kellermann
bcf0fdd3a8
meson.build: define NOUSER on Windows for lighter windows.h
...
A few exceptions are needed for sources which include COM header
(directly or indirectly).
This fixes lots of shadow warnings, see
https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:02:49 +02:00
Max Kellermann
a8f05a7efc
win32/HResult: un-inline HRESULTToString() to reduce header dependencies
2021-05-19 17:48:42 +02:00
Max Kellermann
c64a3b5dbb
fs/Glob: un-inline the Windows version to reduce header dependencies
2021-05-19 17:41:23 +02:00
Max Kellermann
16c38c438f
fs/Glob: use defaulted move constructor
2021-05-19 17:40:23 +02:00
Max Kellermann
48cc4a6ced
fs/Glob: remove redundant #ifdefs
2021-05-19 17:40:03 +02:00
Max Kellermann
a169a05e41
win32, ...: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-05-19 17:25:32 +02:00
Max Kellermann
8efa5c7641
output/wasapi: use "%lu" in log calls
...
"%lu" is portable - it works with both POSIX and Microsoft flavors.
Fixes a part of https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 17:10:49 +02:00
Max Kellermann
28e7be248f
util/RuntimeError: disable -Wformat-security as a kludge
2021-05-19 14:57:20 +02:00
Max Kellermann
e016cc8940
lib/upnp/meson.build: auto-disable UPnP without CURL/expat
2021-05-19 14:37:13 +02:00
GrimReaperFloof
34f636ffc3
Change WritableBuffer<uint8_t> to AllocatedArray<std::byte>
2021-05-19 09:54:06 +02:00
GrimReaperFloof
a134f692bf
Code deduplication: move mod_loadfile() into ModCommon.cxx
2021-05-19 09:53:39 +02:00
Max Kellermann
d747576793
Merge branch 'npu' of git://github.com/neheb/MPD
2021-05-19 09:48:12 +02:00
Max Kellermann
d9578f6427
Merge branch 'flac-ogg' of git://github.com/jprjr/VGMPD
2021-05-19 09:33:42 +02:00
Max Kellermann
b2cec7a0a3
Merge branch 'v0.22.x'
2021-05-19 08:09:05 +02:00
Max Kellermann
85db2d6704
db/proxy: split search into chunks to avoid exceeding the output buffer
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1130
2021-05-19 08:04:50 +02:00
Max Kellermann
22ebb2bdd5
db/proxy: send "window" as separate parameter to SendConstraints()
2021-05-19 07:51:48 +02:00
Max Kellermann
e108568082
db/proxy: require libmpdclient 2.11 or later
...
Remove lots of #ifdefs.
2021-05-19 07:46:42 +02:00
Max Kellermann
4fc08e39b4
db/proxy: require MPD 0.20 or later
...
Allows using ranges, always. This is required to fix
https://github.com/MusicPlayerDaemon/MPD/issues/1130 without adding
more runtime conditionals.
2021-05-19 07:41:04 +02:00
Max Kellermann
c3f9b38c97
command/PlaylistCommands: pass real_uri to LookupRemoteTag()
...
For querying tags, the real song URI should be used, because if the
(display) URI is different, requesting it will not produce a usable
response. This is a theoretical problem because none of the existing
playlist plugins sets the real_uri.
This requires changing the URI comparison in playlist::TagModified().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1154
2021-05-18 21:35:09 +02:00
Max Kellermann
dbb18a401b
command/file: cache the last "albumart" file
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1156
2021-05-18 17:04:09 +02:00
Max Kellermann
e1e41708af
input/LastInputStream: new class
2021-05-18 17:04:09 +02:00
Max Kellermann
a2bdac571a
Merge branch 'v0.22.x'
2021-05-17 19:33:15 +02:00
Max Kellermann
638dfc3981
{input,storage}/curl: set CURLOPT_HTTPAUTH=CURLAUTH_BASIC
...
With the default value CURLAUTH_ANY, libcurl needs to probe for
authentication methods first, and only the second request will have an
Authorization header.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1155
2021-05-17 19:26:05 +02:00
Max Kellermann
6f51d910ee
python/build/libs.py: update CURL to 7.76.1
2021-05-17 18:42:05 +02:00
John Regan
87fa6bca54
flac encoder: enable Ogg FLAC and Ogg chaining
...
refactors GenerateOggSerial into a generic GenerateSerial
utility, under the util lib.
libFLAC may be encoded without Ogg support. If Ogg support is disabled,
libFLAC will still export Ogg-related methods (like setting a serial
number), and throw a runtime error when initializing an Ogg stream.
GenerateOggSerial does not depend on libogg. Refactoring it into
a generic GenerateSerial prevents having to add build-time checks
for libogg within the FLAC encoder plugin.
2021-05-15 11:31:01 -04:00
GrimReaperFloof
a0334d1d94
Add resampling mode setting to modplug decoder
2021-05-07 19:48:52 +02:00
Max Kellermann
0f02bbc2fe
output/jack: enable on Windows
...
This enables the JACK output plugin on Windows, but doesn't link
against libjack64.dll, instead loads the DLL at runtime with
LoadLibrary(). This kludge avoids the extremely fragile JACK shared
memory protocol by using the system's libjack64.dll, without requiring
the same DLL at build time.
2021-04-26 21:47:20 +02:00
Max Kellermann
b885f358a5
output/control: add missing nullptr checks
...
Fixes crash when pausing the default partition after an output was
moved to another partition.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1147
2021-04-26 21:34:58 +02:00
Max Kellermann
423f2df5e0
pcm/Volume: drop support for GCC older than 8
2021-04-20 20:01:43 +02:00
Max Kellermann
0122dc8452
util/BindMethod: drop support for GCC older than 7
2021-04-20 20:01:08 +02:00
Max Kellermann
650a30d794
Revert "tag/Pool: use strncmp() without strlen() to compare strings"
...
This reverts commit 1532983fb5
. This
optimization was bad because now all strings match if they are a
prefix of another string, and this caused collisions in the tag string
pool, corrupting the database.
2021-04-15 16:15:44 +02:00
Max Kellermann
95ad1b0cc6
use [[gnu::pure]] instead of gcc_pure
...
This is semi-standard and doesn't require the util/Compiler.h header.
2021-04-06 14:09:21 +02:00
Max Kellermann
52f46b94e9
util/AllocatedString: add concatenating constructor
2021-04-06 14:06:16 +02:00
Max Kellermann
e07e0bc9c1
util/AllocatedArray: include cleanup
2021-04-06 14:05:29 +02:00
Max Kellermann
4a1c231734
net/SocketError: use constexpr
2021-04-06 13:59:58 +02:00
Max Kellermann
fd0e958e95
net/SocketError: use auto
2021-04-06 13:58:46 +02:00
Max Kellermann
3d814115c8
net/SocketError: change "const" to "pure"
2021-04-06 13:58:32 +02:00
Max Kellermann
ca726a0110
util/StringBuffer: make capacity() static
...
This allows using it in constant expressions.
2021-04-06 13:46:07 +02:00
Max Kellermann
e01710cbd1
util/DereferenceIterator: simplify operator->()
...
This makes it compatible with containers storing std::unique_ptr.
2021-04-06 13:45:32 +02:00
Max Kellermann
c87a4a7d08
util/DereferenceIterator: fix static_cast in operator->()
2021-04-06 13:45:10 +02:00
Max Kellermann
b59170b702
Java/Exception: simplify RethrowException()
2021-04-06 13:35:59 +02:00
Max Kellermann
a237db556a
java/File: add non-static GetAbsolutePath() overload
2021-04-06 13:35:59 +02:00
Max Kellermann
285ba54fe5
java/String: remove unnecessary env
parameter
2021-04-06 13:35:59 +02:00
Max Kellermann
ee86434a89
java/String: add const
2021-04-06 13:35:59 +02:00
Max Kellermann
95d5efbfe6
java/Ref: add nullptr comparison
2021-04-06 13:35:59 +02:00
Max Kellermann
c33f206ce8
java/Ref: add nullptr constructor
2021-04-06 13:29:35 +02:00
Max Kellermann
2d95ac2e94
Java/String: inherit the super class constructor
2021-04-06 13:29:24 +02:00
Max Kellermann
f58c14a74a
Java: no namespace indent
2021-04-06 13:29:13 +02:00
Max Kellermann
a52ce7bb7b
java/Ref: add move operator
2021-04-06 13:27:11 +02:00
Max Kellermann
16d187b7ed
java/Ref: remove const
, add default initialiser
2021-04-06 13:26:54 +02:00
Max Kellermann
296ec4d07c
java/Ref: add nullptr check to destructor
...
May allow the compiler to optimize calls away.
2021-04-06 13:26:29 +02:00
Max Kellermann
6e58fd1583
lib/curl/Multi: reword API documentation
2021-03-29 20:19:21 +02:00
Max Kellermann
c5fec4ac2a
lib/curl/Multi: move operator bool() down
2021-03-29 20:19:21 +02:00
Max Kellermann
fe2ca1ddef
lib/curl/Multi: rename parameters
2021-03-29 20:19:19 +02:00
Jean-Francois Dockes
e960626804
Add npupnp support
...
libnpupnp is a C++ modification of libupnp.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-26 14:14:58 -07:00
Simon Persson
7dd2dce6ad
Support new tags in proxy plugin
...
Add support for the following tags when using the proxy database plugin:
WORK
CONDUCTOR
LABEL
GROUPING
MUSICBRAINZ_WORKID
COMPOSERSORT
ENSEMBLE
MOVEMENT
MOVEMENTNUMBER
LOCATION
2021-03-24 20:59:54 +01:00
Max Kellermann
a7ba10423d
Merge branch 'v0.22.x'
2021-03-13 08:41:10 +01:00
John Regan
6dfebf7df9
gme: add support for rsn files
...
Upcoming release of game-music-emu will support it, details here: https://bitbucket.org/mpyne/game-music-emu/pull-requests/23/rsn-support
2021-03-13 08:40:25 +01:00
Shen-Ta Hsieh
4bcdcca7f5
output/wasapi: use calculated new buffer instead old one
2021-03-13 08:39:56 +01:00
bitkeeper
c08a8581ee
Added cross-origin header to http headers of the http output.
...
The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream.
The fix is to add the following header to the http response:
Access-Control-Allow-Origin: *
2021-03-10 21:27:19 +01:00
Simon Persson
8f1e7385b7
Add tags relevant to classical music.
...
This commit adds some tags that are (mostly) interesting for listeners
of classical music.
Ensemble
--------
This is an ensemble that is playing the music, such as Wiener
Philharmoniker. The tag can be used to distinguish the ensemble from the
conductor, composer, soloist, and ensemble, that are generally all in
the "ARTIST" tag.
Movement
-------
The movement number and movement (name) of this track, i.e. "II" and
"Allegro".
ComposerSort
------------
Allows us to look for Beethoven's 9th under B, for Beethoven, not L for
Ludwig.
Location
--------
This is the location of the recording, e.g. "Wiener Musikverein".
2021-03-10 21:24:25 +01:00
Max Kellermann
25354b9d8c
Merge branch 'v0.22.x'
2021-03-10 21:06:12 +01:00
Max Kellermann
25b0194036
output/wasapi: implement Drain()
2021-03-10 21:05:48 +01:00
Max Kellermann
77fe727e69
output/wasapi: move the "is_started" flag to class WasapiOutputThread
2021-03-10 20:43:28 +01:00
Max Kellermann
73f9824ddf
output/wasapi: eliminate friend
declaration
2021-03-10 20:38:41 +01:00
Max Kellermann
1fe0c673bc
output/wasapi: implement Cancel() properly
...
Calling consume_all() is illegal in the producer thread.
2021-03-10 20:38:27 +01:00
Max Kellermann
8a045207a7
output/wasapi: add field paused
...
Fixes bogus Delay() results at the start of playback, because Delay()
thinks the output is paused.
2021-03-10 20:09:37 +01:00
Max Kellermann
fe7c5a4208
output/wasapi: initialize is_started in Open()
2021-03-10 20:07:22 +01:00
Max Kellermann
8024f7e84d
output/wasapi: move the thread->Play() call right before the consumed_size check
...
Fixes a bogus assertion failure (which can now be removed).
2021-03-10 20:07:19 +01:00
Max Kellermann
14f0134097
output/wasapi: make device_config const
2021-03-10 20:05:14 +01:00
Max Kellermann
1da27be84d
output/wasapi: move runtime fields below configuration fields
2021-03-10 20:00:08 +01:00
Max Kellermann
08135f2cb7
output/wasapi: make configuration fields const
2021-03-10 19:58:33 +01:00
Max Kellermann
5907656bbb
output/wasapi: stop the IAudioClient while paused
...
Instead of generating silence, do nothing, don't waste CPU time.
2021-03-10 17:48:49 +01:00
Max Kellermann
2ac2bd26f8
output/wasapi: combine two if
statements to one switch
2021-03-10 17:45:54 +01:00
Max Kellermann
a2be91aea5
output/wasapi: add method WasapiOutputThread::InterruptWaiter()
2021-03-10 17:42:26 +01:00
Max Kellermann
579428172e
output/wasapi: remove the broken Delay() calculation code
...
This code is complicated - and broken: the producer thread is not
allowed to call consumer methods. Also the code is not necessary
because this plugin implements Interrupt().
2021-03-10 17:39:07 +01:00
Max Kellermann
3e484637f9
output/wasapi: rename OpenDevice() to ChooseDevice()
...
OpenDevice was a confusing name because it does not actually open a
device.
2021-03-10 17:34:10 +01:00
Max Kellermann
3e93c392d7
output/wasapi: make enumerator
a local variable
2021-03-10 17:23:41 +01:00
Max Kellermann
0a97e68aa9
output/wasapi: start after the buffer has been filled
...
Postpone the Start() call until there is something to be played.
2021-03-08 23:03:25 +01:00
Max Kellermann
69783a44c8
output/wasapi: move Start()/Stop() calls to WasapiOutputThread::Work()
2021-03-08 22:58:20 +01:00
Max Kellermann
d72263d28d
win32/HResult: support AUDCLNT_E_NOT_{INITIALIZED,STOPPED}
2021-03-08 22:57:44 +01:00
Max Kellermann
24a205a1aa
win32/HResult: try to use FormatMessage()
2021-03-08 22:54:46 +01:00
Max Kellermann
3a948515ce
output/wasapi: check for exceptions after Wait()
...
This finishes problems which occur early in the WasapiOutputThread;
previously, the error was ignored and the output blocked forever
without doing anything (and without reporting the error).
2021-03-08 22:46:40 +01:00
Max Kellermann
9ade93983c
output/wasapi: rename method WaitDataPoped() to Wait()
2021-03-08 22:44:49 +01:00
Max Kellermann
6931ce9558
output/wasapi: make the Thread a field, not a base class
2021-03-08 22:30:19 +01:00
Max Kellermann
d6fb07a3e4
output/wasapi: start the WasapiOutputThread in its constructor
2021-03-08 22:29:33 +01:00
Max Kellermann
01d3c2705e
output/wasapi: Finish() calls Join()
2021-03-08 22:28:36 +01:00