filter/ReplayGain: emit "mixer" event when replay gain changes volume

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1294
This commit is contained in:
Max Kellermann 2021-10-19 09:51:07 +02:00
parent aa9933c0b5
commit 4f1e79b6b8
2 changed files with 6 additions and 0 deletions

1
NEWS
View File

@ -3,6 +3,7 @@ ver 0.23.1 (not yet released)
- use decimal notation instead of scientific notation
- "load" supports relative positions
* output
- emit "mixer" idle event when replay gain changes volume
- pipewire: emit "mixer" idle events on external volume change
- pipewire: attempt to change the graph sample rate
- snapcast: fix time stamp bug which caused "Failed to get chunk"

View File

@ -27,6 +27,7 @@
#include "pcm/Volume.hxx"
#include "util/ConstBuffer.hxx"
#include "util/Domain.hxx"
#include "Idle.hxx"
#include "Log.hxx"
#include <cassert>
@ -169,6 +170,10 @@ ReplayGainFilter::Update()
try {
mixer_set_volume(mixer, _volume);
/* TODO: emit this idle event only for the
current partition */
idle_add(IDLE_MIXER);
} catch (...) {
LogError(std::current_exception(),
"Failed to update hardware mixer");