aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
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/output_thread.c
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/output_thread.c')
-rw-r--r--src/output_thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index 0e34c64b7..4bf0827f6 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -264,7 +264,8 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk)
/* update replay gain */
- if (chunk->replay_gain_serial != ao->replay_gain_serial) {
+ if (ao->replay_gain_filter != NULL &&
+ chunk->replay_gain_serial != ao->replay_gain_serial) {
replay_gain_filter_set_info(ao->replay_gain_filter,
chunk->replay_gain_serial != 0
? &chunk->replay_gain_info