fix bug shown by X-Fixer in ...apply_gain()
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 10 Jan 2003 04:36:36 +0000 (04:36 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 10 Jan 2003 04:36:36 +0000 (04:36 +0000)
src/plugin_common/replaygain_synthesis.c

index 0af79151a258022cecf7c4728b61c75b679365a4..0fab773da23d8a7326e703f78eea4367d9a650d2 100644 (file)
@@ -358,8 +358,8 @@ int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__int32 *input, un
                -1073741824, /* 31 bits-per-sample */
                (FLAC__int64)(-1073741824) * 2 /* 32 bits-per-sample */
        };
-       const FLAC__int32 conv_factor = conv_factors_[source_bps];
-       const FLAC__int64 hard_clip_factor = hard_clip_factors_[source_bps];
+       const FLAC__int32 conv_factor = conv_factors_[target_bps];
+       const FLAC__int64 hard_clip_factor = hard_clip_factors_[target_bps];
        /*
         * The integer input coming in has a varying range based on the
         * source_bps.  We want to normalize it to [-1.0, 1.0) so instead