]> 4ch.mooo.com Git - 16.git/blob - src/lib/dl/ext/flac/decode.h
refresh wwww
[16.git] / src / lib / dl / ext / flac / decode.h
1 /* flac - Command-line FLAC encoder/decoder
2  * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  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 #if HAVE_CONFIG_H
23 #  include "config.h"
24 #endif
25
26 #include "analyze.h"
27 #include "foreign_metadata.h"
28 #include "utils.h"
29 #include "share/replaygain_synthesis.h"
30
31
32 typedef struct {
33         FLAC__bool apply;
34         FLAC__bool use_album_gain; /* false => use track gain */
35         enum { RGSS_LIMIT__NONE, RGSS_LIMIT__PEAK, RGSS_LIMIT__HARD} limiter;
36         NoiseShaping noise_shaping;
37         double preamp;
38 } replaygain_synthesis_spec_t;
39
40 typedef struct {
41         FLAC__bool treat_warnings_as_errors;
42         FLAC__bool continue_through_decode_errors;
43         replaygain_synthesis_spec_t replaygain_synthesis_spec;
44 #if FLAC__HAS_OGG
45         FLAC__bool is_ogg;
46         FLAC__bool use_first_serial_number;
47         long serial_number;
48 #endif
49         utils__SkipUntilSpecification skip_specification;
50         utils__SkipUntilSpecification until_specification;
51         FLAC__bool has_cue_specification;
52         utils__CueSpecification cue_specification;
53         FLAC__bool channel_map_none; /* --channel-map=none specified, eventually will expand to take actual channel map */
54 } decode_options_t;
55
56 /* used for AIFF also */
57 typedef struct {
58         decode_options_t common;
59         foreign_metadata_t *foreign_metadata; /* NULL unless --keep-foreign-metadata requested */
60 } wav_decode_options_t;
61
62 typedef struct {
63         decode_options_t common;
64
65         FLAC__bool is_big_endian;
66         FLAC__bool is_unsigned_samples;
67 } raw_decode_options_t;
68
69 /* outfile == 0 => test only */
70 int flac__decode_aiff(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, wav_decode_options_t options);
71 int flac__decode_wav(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, wav_decode_options_t options);
72 int flac__decode_raw(const char *infilename, const char *outfilename, FLAC__bool analysis_mode, analysis_options aopts, raw_decode_options_t options);
73
74 #endif