aboutsummaryrefslogtreecommitdiffstats
path: root/src/replay_gain.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-17 22:58:19 +0200
committerMax Kellermann <max@duempel.org>2009-10-17 22:58:19 +0200
commitbddb6b42738c8637000896d867e89691d3a57c3e (patch)
treef3eb6ee1c580a1264d33507ab7684402d2a19a55 /src/replay_gain.h
parent7ec32704f9b0cd22f7bde1654a5e80bb28ee9e22 (diff)
downloadmpd-bddb6b42738c8637000896d867e89691d3a57c3e.tar.gz
mpd-bddb6b42738c8637000896d867e89691d3a57c3e.tar.xz
mpd-bddb6b42738c8637000896d867e89691d3a57c3e.zip
command: allow changing replay gain mode on-the-fly
The new command "replay_gain_mode" allows the user to switch the replay gain mode on-the-fly. No more mpd.conf editing.
Diffstat (limited to 'src/replay_gain.h')
-rw-r--r--src/replay_gain.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/replay_gain.h b/src/replay_gain.h
index aa48f3f14..5d0492ad8 100644
--- a/src/replay_gain.h
+++ b/src/replay_gain.h
@@ -23,6 +23,8 @@
#ifndef MPD_REPLAY_GAIN_H
#define MPD_REPLAY_GAIN_H
+#include <stdbool.h>
+
enum replay_gain_mode {
REPLAY_GAIN_OFF = -1,
REPLAY_GAIN_ALBUM,
@@ -52,6 +54,20 @@ void replay_gain_info_free(struct replay_gain_info *info);
void replay_gain_global_init(void);
+/**
+ * Returns the current replay gain mode as a machine-readable string.
+ */
+const char *
+replay_gain_get_mode_string(void);
+
+/**
+ * Sets the replay gain mode, parsed from a string.
+ *
+ * @return true on success, false if the string could not be parsed
+ */
+bool
+replay_gain_set_mode_string(const char *p);
+
void
replay_gain_apply(struct replay_gain_info *info, char *buffer, int bufferSize,
const struct audio_format *format);