aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter/replay_gain_filter_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-02-16 08:55:37 +0100
committerMax Kellermann <max@duempel.org>2010-02-17 08:14:07 +0100
commit96493e0333404ddea739a08e1e3ead8dcb6f836c (patch)
tree5c953ea3a3b5f7f22174e6046a6b107390524438 /src/filter/replay_gain_filter_plugin.h
parent48b49e230352de10bb3f66a1c85d367dade52001 (diff)
downloadmpd-96493e0333404ddea739a08e1e3ead8dcb6f836c.tar.gz
mpd-96493e0333404ddea739a08e1e3ead8dcb6f836c.tar.xz
mpd-96493e0333404ddea739a08e1e3ead8dcb6f836c.zip
replay_gain: optionally use hardware mixer to apply replay gain
Add an option for each audio output which enables the use of the hardware mixer, instead of the software volume code. This is hardware specific, and assumes linear volume control. This is not the case for hardware mixers which were tested, making this patch somewhat useless, but we will use it to experiment with the settings, to find a good solution.
Diffstat (limited to 'src/filter/replay_gain_filter_plugin.h')
-rw-r--r--src/filter/replay_gain_filter_plugin.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/filter/replay_gain_filter_plugin.h b/src/filter/replay_gain_filter_plugin.h
index 4ab9f42a6..348b4f50c 100644
--- a/src/filter/replay_gain_filter_plugin.h
+++ b/src/filter/replay_gain_filter_plugin.h
@@ -23,6 +23,19 @@
#include "replay_gain_info.h"
struct filter;
+struct mixer;
+
+/**
+ * Enables or disables the hardware mixer for applying replay gain.
+ *
+ * @param mixer the hardware mixer, or NULL to fall back to software
+ * volume
+ * @param base the base volume level for scale=1.0, between 1 and 100
+ * (including).
+ */
+void
+replay_gain_filter_set_mixer(struct filter *_filter, struct mixer *mixer,
+ unsigned base);
/**
* Sets a new #replay_gain_info at the beginning of a new song.