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