1c74663799493f2b1e6123c18def94295d0afab7Kenny Root/* libFLAC - Free Lossless Audio Codec library
2c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Copyright (C) 2001,2002,2003,2004,2005,2006,2007  Josh Coalson
3c74663799493f2b1e6123c18def94295d0afab7Kenny Root *
4c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Redistribution and use in source and binary forms, with or without
5c74663799493f2b1e6123c18def94295d0afab7Kenny Root * modification, are permitted provided that the following conditions
6c74663799493f2b1e6123c18def94295d0afab7Kenny Root * are met:
7c74663799493f2b1e6123c18def94295d0afab7Kenny Root *
8c74663799493f2b1e6123c18def94295d0afab7Kenny Root * - Redistributions of source code must retain the above copyright
9c74663799493f2b1e6123c18def94295d0afab7Kenny Root * notice, this list of conditions and the following disclaimer.
10c74663799493f2b1e6123c18def94295d0afab7Kenny Root *
11c74663799493f2b1e6123c18def94295d0afab7Kenny Root * - Redistributions in binary form must reproduce the above copyright
12c74663799493f2b1e6123c18def94295d0afab7Kenny Root * notice, this list of conditions and the following disclaimer in the
13c74663799493f2b1e6123c18def94295d0afab7Kenny Root * documentation and/or other materials provided with the distribution.
14c74663799493f2b1e6123c18def94295d0afab7Kenny Root *
15c74663799493f2b1e6123c18def94295d0afab7Kenny Root * - Neither the name of the Xiph.org Foundation nor the names of its
16c74663799493f2b1e6123c18def94295d0afab7Kenny Root * contributors may be used to endorse or promote products derived from
17c74663799493f2b1e6123c18def94295d0afab7Kenny Root * this software without specific prior written permission.
18c74663799493f2b1e6123c18def94295d0afab7Kenny Root *
19c74663799493f2b1e6123c18def94295d0afab7Kenny Root * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20c74663799493f2b1e6123c18def94295d0afab7Kenny Root * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21c74663799493f2b1e6123c18def94295d0afab7Kenny Root * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22c74663799493f2b1e6123c18def94295d0afab7Kenny Root * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
23c74663799493f2b1e6123c18def94295d0afab7Kenny Root * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24c74663799493f2b1e6123c18def94295d0afab7Kenny Root * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25c74663799493f2b1e6123c18def94295d0afab7Kenny Root * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26c74663799493f2b1e6123c18def94295d0afab7Kenny Root * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27c74663799493f2b1e6123c18def94295d0afab7Kenny Root * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28c74663799493f2b1e6123c18def94295d0afab7Kenny Root * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29c74663799493f2b1e6123c18def94295d0afab7Kenny Root * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30c74663799493f2b1e6123c18def94295d0afab7Kenny Root */
31c74663799493f2b1e6123c18def94295d0afab7Kenny Root
32c74663799493f2b1e6123c18def94295d0afab7Kenny Root#ifndef FLAC__PROTECTED__STREAM_ENCODER_H
33c74663799493f2b1e6123c18def94295d0afab7Kenny Root#define FLAC__PROTECTED__STREAM_ENCODER_H
34c74663799493f2b1e6123c18def94295d0afab7Kenny Root
35c74663799493f2b1e6123c18def94295d0afab7Kenny Root#include "FLAC/stream_encoder.h"
36c74663799493f2b1e6123c18def94295d0afab7Kenny Root#if FLAC__HAS_OGG
37c74663799493f2b1e6123c18def94295d0afab7Kenny Root#include "private/ogg_encoder_aspect.h"
38c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif
39c74663799493f2b1e6123c18def94295d0afab7Kenny Root
40c74663799493f2b1e6123c18def94295d0afab7Kenny Root#ifndef FLAC__INTEGER_ONLY_LIBRARY
41c74663799493f2b1e6123c18def94295d0afab7Kenny Root
42c74663799493f2b1e6123c18def94295d0afab7Kenny Root#include "private/float.h"
43c74663799493f2b1e6123c18def94295d0afab7Kenny Root
44c74663799493f2b1e6123c18def94295d0afab7Kenny Root#define FLAC__MAX_APODIZATION_FUNCTIONS 32
45c74663799493f2b1e6123c18def94295d0afab7Kenny Root
46c74663799493f2b1e6123c18def94295d0afab7Kenny Roottypedef enum {
47c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_BARTLETT,
48c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_BARTLETT_HANN,
49c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_BLACKMAN,
50c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_BLACKMAN_HARRIS_4TERM_92DB_SIDELOBE,
51c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_CONNES,
52c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_FLATTOP,
53c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_GAUSS,
54c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_HAMMING,
55c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_HANN,
56c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_KAISER_BESSEL,
57c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_NUTTALL,
58c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_RECTANGLE,
59c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_TRIANGLE,
60c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_TUKEY,
61c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__APODIZATION_WELCH
62c74663799493f2b1e6123c18def94295d0afab7Kenny Root} FLAC__ApodizationFunction;
63c74663799493f2b1e6123c18def94295d0afab7Kenny Root
64c74663799493f2b1e6123c18def94295d0afab7Kenny Roottypedef struct {
65c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__ApodizationFunction type;
66c74663799493f2b1e6123c18def94295d0afab7Kenny Root	union {
67c74663799493f2b1e6123c18def94295d0afab7Kenny Root		struct {
68c74663799493f2b1e6123c18def94295d0afab7Kenny Root			FLAC__real stddev;
69c74663799493f2b1e6123c18def94295d0afab7Kenny Root		} gauss;
70c74663799493f2b1e6123c18def94295d0afab7Kenny Root		struct {
71c74663799493f2b1e6123c18def94295d0afab7Kenny Root			FLAC__real p;
72c74663799493f2b1e6123c18def94295d0afab7Kenny Root		} tukey;
73c74663799493f2b1e6123c18def94295d0afab7Kenny Root	} parameters;
74c74663799493f2b1e6123c18def94295d0afab7Kenny Root} FLAC__ApodizationSpecification;
75c74663799493f2b1e6123c18def94295d0afab7Kenny Root
76c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif // #ifndef FLAC__INTEGER_ONLY_LIBRARY
77c74663799493f2b1e6123c18def94295d0afab7Kenny Root
78c74663799493f2b1e6123c18def94295d0afab7Kenny Roottypedef struct FLAC__StreamEncoderProtected {
79c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__StreamEncoderState state;
80c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool verify;
81c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool streamable_subset;
82c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool do_md5;
83c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool do_mid_side_stereo;
84c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool loose_mid_side_stereo;
85c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned channels;
86c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned bits_per_sample;
87c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned sample_rate;
88c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned blocksize;
89c74663799493f2b1e6123c18def94295d0afab7Kenny Root#ifndef FLAC__INTEGER_ONLY_LIBRARY
90c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned num_apodizations;
91c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__ApodizationSpecification apodizations[FLAC__MAX_APODIZATION_FUNCTIONS];
92c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif
93c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned max_lpc_order;
94c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned qlp_coeff_precision;
95c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool do_qlp_coeff_prec_search;
96c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool do_exhaustive_model_search;
97c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__bool do_escape_coding;
98c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned min_residual_partition_order;
99c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned max_residual_partition_order;
100c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned rice_parameter_search_dist;
101c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__uint64 total_samples_estimate;
102c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__StreamMetadata **metadata;
103c74663799493f2b1e6123c18def94295d0afab7Kenny Root	unsigned num_metadata_blocks;
104c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__uint64 streaminfo_offset, seektable_offset, audio_offset;
105c74663799493f2b1e6123c18def94295d0afab7Kenny Root#if FLAC__HAS_OGG
106c74663799493f2b1e6123c18def94295d0afab7Kenny Root	FLAC__OggEncoderAspect ogg_encoder_aspect;
107c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif
108c74663799493f2b1e6123c18def94295d0afab7Kenny Root} FLAC__StreamEncoderProtected;
109c74663799493f2b1e6123c18def94295d0afab7Kenny Root
110c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif
111