diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder/flac_pcm.h (renamed from src/normalize.c) | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/src/normalize.c b/src/decoder/flac_pcm.h index 63c0d15cb..bccfc645c 100644 --- a/src/normalize.c +++ b/src/decoder/flac_pcm.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2009 The Music Player Daemon Project + * Copyright (C) 2003-2010 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,33 +17,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "normalize.h" -#include "compress.h" -#include "conf.h" -#include "audio_format.h" - -#define DEFAULT_VOLUME_NORMALIZATION 0 - -int normalizationEnabled; +#ifndef MPD_FLAC_PCM_H +#define MPD_FLAC_PCM_H -void initNormalization(void) -{ - normalizationEnabled = config_get_bool(CONF_VOLUME_NORMALIZATION, - DEFAULT_VOLUME_NORMALIZATION); - - if (normalizationEnabled) - CompressCfg(0, ANTICLIP, TARGET, GAINMAX, GAINSMOOTH, BUCKETS); -} +#include "audio_format.h" -void finishNormalization(void) -{ - if (normalizationEnabled) CompressFree(); -} +#include <FLAC/ordinals.h> -void normalizeData(char *buffer, int bufferSize, - const struct audio_format *format) -{ - if ((format->bits != 16) || (format->channels != 2)) return; +void +flac_convert(void *dest, + unsigned int num_channels, enum sample_format sample_format, + const FLAC__int32 *const buf[], + unsigned int position, unsigned int end); - CompressDo(buffer, bufferSize); -} +#endif |