Commit Graph

17112 Commits

Author SHA1 Message Date
Max Kellermann 84f43ccde8 LogInit: default to stderr on Windows
Don't require "log_file" setting, for "--no-config" operation.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1600
2022-09-06 21:04:53 +02:00
Max Kellermann 38704c9cf3 LogInit: improve systemd/journald comment 2022-09-06 21:03:56 +02:00
Max Kellermann 910d0ec92b test/net/meson.build: add missing dependency 2022-09-06 20:44:24 +02:00
Max Kellermann 3b05c89765 archive/iso9660: fix off-by-one assertion failure
Calling data[fill] could trigger an assertion failure if
fill==data.size(), even if we call it only to take the address.

Instead of doing that, this commit changes the code to pointer
arithmetic.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1556
2022-09-06 20:28:33 +02:00
Max Kellermann e77b3fa46f increment version number to 0.23.10 2022-09-06 20:23:50 +02:00
Max Kellermann 12147f6d58 release v0.23.9 2022-08-18 18:20:54 +02:00
Max Kellermann 40bc60d6ae Main: load Android mpd.conf from ExternalFilesDir
See also https://github.com/MusicPlayerDaemon/MPD/issues/1061

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1570
2022-08-18 18:17:43 +02:00
Max Kellermann 7778210269 Main: move code to TryReadConfigFile() 2022-08-18 18:12:21 +02:00
Max Kellermann 6229210d51 Main: move code to LoadConfigFile() 2022-08-18 18:11:49 +02:00
Max Kellermann 5d0d5b5d97 Android/Context: allow type=nullptr in GetExternalFilesDir() 2022-08-18 18:11:49 +02:00
Max Kellermann 1aa3c1e543 java/String: add static method Optional() 2022-08-18 18:10:16 +02:00
Max Kellermann b90e32fe4e Android/Context: look up methods once during startup 2022-08-18 18:10:14 +02:00
Max Kellermann 1f4df2a64d android/Environment: pass JNIEnv to all functions 2022-08-18 18:09:54 +02:00
Max Kellermann 2efc1db6a9 android/Environment: no namespace indent 2022-08-18 18:08:45 +02:00
Max Kellermann e2d4654e20 filter/ReplayGain: invoke the MixerListener after volume change
This ensures that Partition::OnMixerVolumeChanged() invokes
MixerMemento::InvalidateHardwareVolume(), clearing the cached volume
level.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1526
2022-08-18 14:45:45 +02:00
Max Kellermann 2b8f1170a6 mixer/Control: use Mixer::IsGlobal() 2022-08-18 14:33:35 +02:00
Max Kellermann 5c4743441e mixer/All: use Mixer::IsPlugin() 2022-08-18 14:08:31 +02:00
Max Kellermann cb288439a4 {android,win32}/build.py: make stdout/stderr unbuffered
Avoid excessive buffering if run by CI.
2022-08-08 23:48:23 +02:00
Max Kellermann 69f741e8a6 mixer/Memento: move IDLE_MIXER out of SetVolume()
Make this idle event per-partition.
2022-08-08 23:32:57 +02:00
Max Kellermann 4b4f47002b mixer/Volume: refactor to class MixerMemento, per partition
Eliminate global variables, convert them to MixerMemento fields.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1583
2022-08-08 23:30:27 +02:00
Max Kellermann 615c301961 mixer/Volume: remove logging (mostly useless) 2022-08-08 23:13:14 +02:00
Max Kellermann dc07180e48 input/CdioParanoia: add options "mode" and "skip"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1529
2022-08-08 22:53:48 +02:00
Max Kellermann d3b235bab5 input/CdioParanoia: move global variables up 2022-08-08 22:38:28 +02:00
Max Kellermann 7c920ddebe filter/ffmpeg: fix FFmpeg 5.1 deprecation warnings 2022-08-08 21:34:26 +02:00
Dave Hocker bbc088ae4e This PR provides forward and backward compatibility at macos SDK 12.0. At SDK 12.0, API function names were changed essentially replacing
occurrences of the word Master/master with Main/main. This change was test built on two different systems.

1. macos 10.15.7 with Xcode 12.4 and clang 12.0.0 on x86_64
2. macos 12.5 with Xcode 13.4.1 and clang 13.1.6 on arm64 (Apple silicon M1)

It should be noted that on macos 10.15.7 with Xcode 11.2 and clang 11.0, MPD will not build.
The MPD documentation states that clang 11.0 is the minimum requirement,
but clang 11.0 produces compile errors. Apparently the macos version
of clang 11.0 is not fully compliant.
2022-08-08 17:39:29 +02:00
Max Kellermann fe195257d8 python/build/libs.py: update FFmpeg to 5.1 2022-07-27 11:04:14 +02:00
Max Kellermann 57d5df8118 decoder/ffmpeg: fix FFmpeg 5.1 deprecation warnings 2022-07-27 11:04:09 +02:00
Max Kellermann 59792cb0b8 decoder/ffmpeg: wrap FFmpeg include in "extern C"
Commit ebae25d175 added that #include, but forgot to wrap it in
"extern C", so the linker tried to look up C++ symbols, causing linker
failure.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1582
2022-07-27 11:04:03 +02:00
Rosen Penev cc557c4d60 meson: port ncpmc iconv solution
Properly deals with iconv, unlike the current solution. have_iconv fails
when libiconv CFLAGS are passed to the compiler. Tested under OpenWrt
with its CONFIG_BUILD_NLS, which adds libiconv include flags.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-20 08:03:24 +02:00
guihkx 956c5faebb output/PipeWire: set app icon
Closes #1564
2022-07-12 13:59:05 +02:00
Max Kellermann cd0396c1f1 test/run_decoder: remove bogus assert() 2022-07-12 11:59:14 +02:00
Max Kellermann 79f9b268bb increment version number to 0.23.9 2022-07-12 11:50:47 +02:00
Max Kellermann b45f3c8deb Android release 0.23.8 2022-07-12 11:48:41 +02:00
Max Kellermann f8a8de87e4 android/AndroidManifest.xml: update targetSdkVersion to 30
Required by Google Play.
2022-07-12 11:48:41 +02:00
Max Kellermann 2183f0553c android/meson.build: use apksigner instead of jarsigner
This is required for targetSdkVersion=30.

apksigner requires running zipalign first.
2022-07-12 11:48:41 +02:00
Max Kellermann 1f28790476 release v0.23.8 2022-07-09 01:05:38 +02:00
Max Kellermann c8dae95eff output/PipeWire: after Cancel(), refill buffer before resuming playback
Deactivate the stream in Cancel().  This fixes stuttering after a
manual song change by refilling the whole ring buffer before
reactivating the stream.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:03:36 +02:00
Max Kellermann 547a084c7e output/PipeWire: call pw_stream_flush() in Cancel()
Clear not only MPD's ring buffer, but also libpipewire's buffers, to
avoid playing some audio from the previous song after a manual song
change.

Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:01:29 +02:00
Max Kellermann 493677ff81 output/PipeWire: skip Cancel() if already drained 2022-07-09 00:53:53 +02:00
Max Kellermann 6b430ba271 output/PipeWire: activate stream in Drain() 2022-07-09 00:53:20 +02:00
Max Kellermann bc6924d303 output/snapcast: fix busy loop while paused
Removing the LockHasClients(); this code was copied from the "httpd"
output plugin, but unlike "httpd", the SnapCast output plugin does not
feed silence while paused, so we need to implement a delay to avoid
busy-looping the CPU.

As a side effect, this eliminates the suttering after resuming
playback, because the timer now gets reset even if there is a client.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1394
2022-07-08 22:55:41 +02:00
Max Kellermann 02b00f9146 output/PipeWire: don't force initial volume=100%
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1484
2022-07-08 18:25:41 +02:00
Max Kellermann e807ed5870 output/PipeWire: ignore SPA_PROP_channelVolumes if n_values==0
After connecting, PipeWire sometimes sends SPA_PROP_channelVolumes
with no values, and this led to "volume=-NaN".
2022-07-08 18:13:33 +02:00
Max Kellermann f08944253b output/PipeWire: check SPA_PROP_channelVolumes, not control name
Since PipeWire 0.3.53, there is no control name anymore, therefore the
name check doesn't work anymore, breaking volume change events.

This obsoletes the crash bug fix in commit 2ee57f9b0d
2022-07-08 18:06:36 +02:00
Max Kellermann 792d6584b9 output/PipeWire: move code to OnChannelVolumes() 2022-07-08 18:02:36 +02:00
Max Kellermann 7b45d01462 output/PipeWire: update field "volume" 2022-07-08 17:44:39 +02:00
Max Kellermann 5c17b2966a output/PipeWire: use std::accumulate 2022-07-08 17:44:08 +02:00
Max Kellermann 0c54f29446 output/PipeWire: document field "volume" 2022-07-08 17:30:57 +02:00
Max Kellermann 9c3cf39fdd output/PipeWire: catch exceptions in ParamChanged()
Fixes a potential crash bug.
2022-07-08 17:24:41 +02:00
Max Kellermann d2fb229685 output/PipeWire: call ::SetVolume() in ParamChanged()
This is a lower-level function without some of the clutter of
PipeWireOutput::SetVolume() which is not needed in that case.
2022-07-08 17:21:17 +02:00