diff options
Diffstat (limited to '')
-rw-r--r-- | src/replay_gain_config.h (renamed from src/replay_gain.h) | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/src/replay_gain.h b/src/replay_gain_config.h index aa48f3f14..8fb77a5f6 100644 --- a/src/replay_gain.h +++ b/src/replay_gain_config.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 @@ -16,44 +16,40 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* - * (c)2004 replayGain code by AliasMrJones - */ -#ifndef MPD_REPLAY_GAIN_H -#define MPD_REPLAY_GAIN_H +#ifndef MPD_REPLAY_GAIN_CONFIG_H +#define MPD_REPLAY_GAIN_CONFIG_H -enum replay_gain_mode { - REPLAY_GAIN_OFF = -1, - REPLAY_GAIN_ALBUM, - REPLAY_GAIN_TRACK, -}; +#include "check.h" +#include "replay_gain_info.h" -struct audio_format; +#include <stdbool.h> extern enum replay_gain_mode replay_gain_mode; - -struct replay_gain_tuple { - float gain; - float peak; -}; - -struct replay_gain_info { - struct replay_gain_tuple tuples[2]; - - /* used internally by mpd, to mess with it */ - float scale; -}; - -struct replay_gain_info * -replay_gain_info_new(void); - -void replay_gain_info_free(struct replay_gain_info *info); +extern float replay_gain_preamp; +extern float replay_gain_missing_preamp; +extern bool replay_gain_limit; void replay_gain_global_init(void); -void -replay_gain_apply(struct replay_gain_info *info, char *buffer, int bufferSize, - const struct audio_format *format); +/** + * Returns the current replay gain mode as a machine-readable string. + */ +const char * +replay_gain_get_mode_string(void); + +/** + * Sets the replay gain mode, parsed from a string. + * + * @return true on success, false if the string could not be parsed + */ +bool +replay_gain_set_mode_string(const char *p); + +/** + * Returns the "real" mode according to the "auto" setting" + */ +enum replay_gain_mode +replay_gain_get_real_mode(void); #endif |