decode.h (2389B)
1 /* flac - Command-line FLAC encoder/decoder 2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef flac__decode_h 20 #define flac__decode_h 21 22 #include "analyze.h" 23 #include "utils.h" 24 #include "share/replaygain_synthesis.h" 25 26 #ifdef HAVE_CONFIG_H 27 #include <config.h> 28 #endif 29 30 typedef struct { 31 FLAC__bool apply; 32 FLAC__bool use_album_gain; /* false => use track gain */ 33 enum { RGSS_LIMIT__NONE, RGSS_LIMIT__PEAK, RGSS_LIMIT__HARD} limiter; 34 NoiseShaping noise_shaping; 35 double preamp; 36 } replaygain_synthesis_spec_t; 37 38 typedef struct { 39 FLAC__bool continue_through_decode_errors; 40 replaygain_synthesis_spec_t replaygain_synthesis_spec; 41 #ifdef FLAC__HAS_OGG 42 FLAC__bool is_ogg; 43 FLAC__bool use_first_serial_number; 44 long serial_number; 45 #endif 46 utils__SkipUntilSpecification skip_specification; 47 utils__SkipUntilSpecification until_specification; 48 FLAC__bool has_cue_specification; 49 utils__CueSpecification cue_specification; 50 } decode_options_t; 51 52 /* used for AIFF also */ 53 typedef struct { 54 decode_options_t common; 55 } wav_decode_options_t; 56 57 typedef struct { 58 decode_options_t common; 59 60 FLAC__bool is_big_endian; 61 FLAC__bool is_unsigned_samples; 62 } raw_decode_options_t; 63 64 /* outfile == 0 => test only */ 65 int flac__decode_aiff(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, wav_decode_options_t options); 66 int flac__decode_wav(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, wav_decode_options_t options); 67 int flac__decode_raw(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, raw_decode_options_t options); 68 69 #endif