diff options
author | Max Kellermann <max@duempel.org> | 2009-11-01 15:44:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-01 15:44:56 +0100 |
commit | 8bfe3497b0909b33b4fdf5a17e80eb45d77fddeb (patch) | |
tree | 115885209ed7e684376ca25d4efee7225ec79e17 | |
parent | 9bcfd3a47da540abeb2da06471cf2fa11c14db49 (diff) | |
download | mpd-8bfe3497b0909b33b4fdf5a17e80eb45d77fddeb.tar.gz mpd-8bfe3497b0909b33b4fdf5a17e80eb45d77fddeb.tar.xz mpd-8bfe3497b0909b33b4fdf5a17e80eb45d77fddeb.zip |
replay_gain: trigger OPTIONS idle event on mode change
Diffstat (limited to '')
-rw-r--r-- | doc/protocol.xml | 6 | ||||
-rw-r--r-- | src/replay_gain.c | 3 | ||||
-rw-r--r-- | test/read_tags.c | 9 | ||||
-rw-r--r-- | test/run_decoder.c | 9 |
4 files changed, 26 insertions, 1 deletions
diff --git a/doc/protocol.xml b/doc/protocol.xml index eb48185e9..b6271403a 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -195,7 +195,7 @@ <para> <returnvalue>options</returnvalue>: options like <option>repeat</option>, <option>random</option>, - <option>crossfade</option> + <option>crossfade</option>, replay gain </para> </listitem> </itemizedlist> @@ -520,6 +520,10 @@ seconds, because the new settings does not affect the buffered data. </para> + <para> + This command triggers the + <returnvalue>options</returnvalue> idle event. + </para> </listitem> </varlistentry> <varlistentry id="command_replay_gain_status"> diff --git a/src/replay_gain.c b/src/replay_gain.c index a59cfa245..020671c8a 100644 --- a/src/replay_gain.c +++ b/src/replay_gain.c @@ -24,6 +24,7 @@ #include "conf.h" #include "audio_format.h" #include "pcm_volume.h" +#include "idle.h" #include <glib.h> @@ -75,6 +76,8 @@ replay_gain_set_mode_string(const char *p) else return false; + idle_add(IDLE_OPTIONS); + return true; } diff --git a/test/read_tags.c b/test/read_tags.c index db2221c13..d38183667 100644 --- a/test/read_tags.c +++ b/test/read_tags.c @@ -25,6 +25,7 @@ #include "tag_ape.h" #include "tag_id3.h" #include "config.h" +#include "idle.h" #include <glib.h> @@ -38,6 +39,14 @@ /** * No-op dummy. */ +void +idle_add(G_GNUC_UNUSED unsigned flags) +{ +} + +/** + * No-op dummy. + */ bool pcm_volume(G_GNUC_UNUSED void *buffer, G_GNUC_UNUSED int length, G_GNUC_UNUSED const struct audio_format *format, diff --git a/test/run_decoder.c b/test/run_decoder.c index 861720cdb..3128c6121 100644 --- a/test/run_decoder.c +++ b/test/run_decoder.c @@ -22,6 +22,7 @@ #include "input_stream.h" #include "audio_format.h" #include "pcm_volume.h" +#include "idle.h" #include <glib.h> @@ -31,6 +32,14 @@ /** * No-op dummy. */ +void +idle_add(G_GNUC_UNUSED unsigned flags) +{ +} + +/** + * No-op dummy. + */ bool pcm_volume(G_GNUC_UNUSED void *buffer, G_GNUC_UNUSED int length, G_GNUC_UNUSED const struct audio_format *format, |