From 0e183d3fa1f216729725127d868d66268e1a35d4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Jan 2010 13:31:20 +0100 Subject: replay_gain: refactor API, move code to replay_gain_state.c The replay_gain_state struct holds the precalculated scale factor, which is removed from struct replay_gain_info. --- src/decoder_thread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/decoder_thread.c') diff --git a/src/decoder_thread.c b/src/decoder_thread.c index f793fd032..625ec46cc 100644 --- a/src/decoder_thread.c +++ b/src/decoder_thread.c @@ -31,7 +31,7 @@ #include "mapper.h" #include "path.h" #include "uri.h" -#include "replay_gain.h" +#include "replay_gain_state.h" #include @@ -303,7 +303,8 @@ decoder_run_song(struct decoder_control *dc, { struct decoder decoder = { .dc = dc, - .replay_gain = NULL, + .replay_gain = replay_gain_state_new(replay_gain_preamp, + replay_gain_missing_preamp), }; int ret; @@ -332,7 +333,7 @@ decoder_run_song(struct decoder_control *dc, /* flush the last chunk */ if (decoder.replay_gain != NULL) - replay_gain_info_free(decoder.replay_gain); + replay_gain_state_free(decoder.replay_gain); if (decoder.chunk != NULL) decoder_flush_chunk(&decoder); -- cgit v1.2.3