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
This commit is contained in:
parent
2b8f1170a6
commit
e2d4654e20
2
NEWS
2
NEWS
@ -3,6 +3,8 @@ ver 0.23.9 (not yet released)
|
|||||||
- cdio_paranoia: add options "mode" and "skip"
|
- cdio_paranoia: add options "mode" and "skip"
|
||||||
* decoder
|
* decoder
|
||||||
- ffmpeg: support FFmpeg 5.1
|
- ffmpeg: support FFmpeg 5.1
|
||||||
|
* filter
|
||||||
|
- replay gain: fix delayed volume display with handler=mixer
|
||||||
* output
|
* output
|
||||||
- pipewire: set app icon
|
- pipewire: set app icon
|
||||||
* fix bogus volume levels with multiple partitions
|
* fix bogus volume levels with multiple partitions
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include "ReplayGainInfo.hxx"
|
#include "ReplayGainInfo.hxx"
|
||||||
#include "ReplayGainConfig.hxx"
|
#include "ReplayGainConfig.hxx"
|
||||||
#include "mixer/MixerControl.hxx"
|
#include "mixer/MixerControl.hxx"
|
||||||
|
#include "mixer/MixerInternal.hxx"
|
||||||
|
#include "mixer/Listener.hxx"
|
||||||
#include "pcm/AudioFormat.hxx"
|
#include "pcm/AudioFormat.hxx"
|
||||||
#include "pcm/Volume.hxx"
|
#include "pcm/Volume.hxx"
|
||||||
#include "util/ConstBuffer.hxx"
|
#include "util/ConstBuffer.hxx"
|
||||||
@ -171,9 +173,11 @@ ReplayGainFilter::Update()
|
|||||||
try {
|
try {
|
||||||
mixer_set_volume(mixer, _volume);
|
mixer_set_volume(mixer, _volume);
|
||||||
|
|
||||||
/* TODO: emit this idle event only for the
|
/* invoke the mixer's listener manually, just
|
||||||
current partition */
|
in case the mixer implementation didn't do
|
||||||
idle_add(IDLE_MIXER);
|
that already (this depends on the
|
||||||
|
implementation) */
|
||||||
|
mixer->listener.OnMixerVolumeChanged(*mixer, _volume);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LogError(std::current_exception(),
|
LogError(std::current_exception(),
|
||||||
"Failed to update hardware mixer");
|
"Failed to update hardware mixer");
|
||||||
|
Loading…
Reference in New Issue
Block a user