diff options
Diffstat (limited to 'src/output_thread.c')
-rw-r--r-- | src/output_thread.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/output_thread.c b/src/output_thread.c index eb44d4c87..0e34c64b7 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -26,6 +26,7 @@ #include "player_control.h" #include "filter_plugin.h" #include "filter/convert_filter_plugin.h" +#include "filter/replay_gain_filter_plugin.h" #include <glib.h> @@ -261,6 +262,16 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) g_mutex_lock(ao->mutex); } + /* update replay gain */ + + if (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 + : NULL); + ao->replay_gain_serial = chunk->replay_gain_serial; + } + if (size == 0) return true; |