1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>FLAC/stream_encoder.h: stream encoder interface</title>
3
<title>FLAC: FLAC/stream_encoder.h: stream encoder interface</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.2.14 -->
8
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
9
<hr><h1>FLAC/stream_encoder.h: stream encoder interface<br>
6
<!-- Generated by Doxygen 1.4.2 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8
<h1>FLAC/stream_encoder.h: stream encoder interface<br>
11
10
[<a class="el" href="group__flac__encoder.html">FLAC/_encoder.h: encoder interfaces</a>]</small>
12
</h1>This module contains the functions which implement the stream encoder.
13
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
14
<tr><td colspan=2><br><h2>Compounds</h2></td></tr>
15
<tr><td nowrap align=right valign=top>struct </td><td valign=bottom><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a></td></tr>
16
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
17
<tr><td nowrap align=right valign=top>typedef <a class="el" href="group__flac__stream__encoder.html#a53">FLAC__StreamEncoderWriteStatus</a>(* </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a2">FLAC__StreamEncoderWriteCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data)</td></tr>
18
<tr><td nowrap align=right valign=top>typedef void(* </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a3">FLAC__StreamEncoderMetadataCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)</td></tr>
19
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>
20
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a52">FLAC__StreamEncoderState</a> { <br>
21
<a class="el" href="group__flac__stream__encoder.html#a52a4">FLAC__STREAM_ENCODER_OK</a> = 0,
22
<a class="el" href="group__flac__stream__encoder.html#a52a5">FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</a>,
23
<a class="el" href="group__flac__stream__encoder.html#a52a6">FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</a>,
24
<a class="el" href="group__flac__stream__encoder.html#a52a7">FLAC__STREAM_ENCODER_INVALID_CALLBACK</a>,
26
<a class="el" href="group__flac__stream__encoder.html#a52a8">FLAC__STREAM_ENCODER_INVALID_NUMBER_OF_CHANNELS</a>,
27
<a class="el" href="group__flac__stream__encoder.html#a52a9">FLAC__STREAM_ENCODER_INVALID_BITS_PER_SAMPLE</a>,
28
<a class="el" href="group__flac__stream__encoder.html#a52a10">FLAC__STREAM_ENCODER_INVALID_SAMPLE_RATE</a>,
29
<a class="el" href="group__flac__stream__encoder.html#a52a11">FLAC__STREAM_ENCODER_INVALID_BLOCK_SIZE</a>,
31
<a class="el" href="group__flac__stream__encoder.html#a52a12">FLAC__STREAM_ENCODER_INVALID_MAX_LPC_ORDER</a>,
32
<a class="el" href="group__flac__stream__encoder.html#a52a13">FLAC__STREAM_ENCODER_INVALID_QLP_COEFF_PRECISION</a>,
33
<a class="el" href="group__flac__stream__encoder.html#a52a14">FLAC__STREAM_ENCODER_MID_SIDE_CHANNELS_MISMATCH</a>,
34
<a class="el" href="group__flac__stream__encoder.html#a52a15">FLAC__STREAM_ENCODER_MID_SIDE_SAMPLE_SIZE_MISMATCH</a>,
36
<a class="el" href="group__flac__stream__encoder.html#a52a16">FLAC__STREAM_ENCODER_ILLEGAL_MID_SIDE_FORCE</a>,
37
<a class="el" href="group__flac__stream__encoder.html#a52a17">FLAC__STREAM_ENCODER_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</a>,
38
<a class="el" href="group__flac__stream__encoder.html#a52a18">FLAC__STREAM_ENCODER_NOT_STREAMABLE</a>,
39
<a class="el" href="group__flac__stream__encoder.html#a52a19">FLAC__STREAM_ENCODER_FRAMING_ERROR</a>,
41
<a class="el" href="group__flac__stream__encoder.html#a52a20">FLAC__STREAM_ENCODER_INVALID_METADATA</a>,
42
<a class="el" href="group__flac__stream__encoder.html#a52a21">FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_ENCODING</a>,
43
<a class="el" href="group__flac__stream__encoder.html#a52a22">FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_WRITING</a>,
44
<a class="el" href="group__flac__stream__encoder.html#a52a23">FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</a>,
46
<a class="el" href="group__flac__stream__encoder.html#a52a24">FLAC__STREAM_ENCODER_ALREADY_INITIALIZED</a>,
47
<a class="el" href="group__flac__stream__encoder.html#a52a25">FLAC__STREAM_ENCODER_UNINITIALIZED</a>
50
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a53">FLAC__StreamEncoderWriteStatus</a> { <a class="el" href="group__flac__stream__encoder.html#a53a26">FLAC__STREAM_ENCODER_WRITE_STATUS_OK</a> = 0,
51
<a class="el" href="group__flac__stream__encoder.html#a53a27">FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</a>
53
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
54
<tr><td nowrap align=right valign=top><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a4">FLAC__stream_encoder_new</a> ()</td></tr>
55
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a5">FLAC__stream_encoder_delete</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
56
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a6">FLAC__stream_encoder_set_verify</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
57
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a7">FLAC__stream_encoder_set_streamable_subset</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
58
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a8">FLAC__stream_encoder_set_do_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
59
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a9">FLAC__stream_encoder_set_loose_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
60
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a10">FLAC__stream_encoder_set_channels</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
61
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a11">FLAC__stream_encoder_set_bits_per_sample</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
62
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a12">FLAC__stream_encoder_set_sample_rate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
63
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a13">FLAC__stream_encoder_set_blocksize</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
64
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a14">FLAC__stream_encoder_set_max_lpc_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
65
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a15">FLAC__stream_encoder_set_qlp_coeff_precision</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
66
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a16">FLAC__stream_encoder_set_do_qlp_coeff_prec_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
67
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a17">FLAC__stream_encoder_set_do_escape_coding</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
68
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a18">FLAC__stream_encoder_set_do_exhaustive_model_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
69
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a19">FLAC__stream_encoder_set_min_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
70
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a20">FLAC__stream_encoder_set_max_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
71
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a21">FLAC__stream_encoder_set_rice_parameter_search_dist</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
72
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a22">FLAC__stream_encoder_set_total_samples_estimate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 value)</td></tr>
73
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a23">FLAC__stream_encoder_set_metadata</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **metadata, unsigned num_blocks)</td></tr>
74
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a24">FLAC__stream_encoder_set_write_callback</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#a2">FLAC__StreamEncoderWriteCallback</a> value)</td></tr>
75
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a25">FLAC__stream_encoder_set_metadata_callback</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#a3">FLAC__StreamEncoderMetadataCallback</a> value)</td></tr>
76
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a26">FLAC__stream_encoder_set_client_data</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, void *value)</td></tr>
77
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__stream__encoder.html#a52">FLAC__StreamEncoderState</a> </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a27">FLAC__stream_encoder_get_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
78
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a28">FLAC__stream_encoder_get_verify_decoder_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
79
<tr><td nowrap align=right valign=top>const char * </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a29">FLAC__stream_encoder_get_resolved_state_string</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
80
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a30">FLAC__stream_encoder_get_verify_decoder_error_stats</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got)</td></tr>
81
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a31">FLAC__stream_encoder_get_verify</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
82
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a32">FLAC__stream_encoder_get_streamable_subset</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
83
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a33">FLAC__stream_encoder_get_do_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
84
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a34">FLAC__stream_encoder_get_loose_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
85
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a35">FLAC__stream_encoder_get_channels</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
86
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a36">FLAC__stream_encoder_get_bits_per_sample</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
87
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a37">FLAC__stream_encoder_get_sample_rate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
88
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a38">FLAC__stream_encoder_get_blocksize</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
89
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a39">FLAC__stream_encoder_get_max_lpc_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
90
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a40">FLAC__stream_encoder_get_qlp_coeff_precision</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
91
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a41">FLAC__stream_encoder_get_do_qlp_coeff_prec_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
92
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a42">FLAC__stream_encoder_get_do_escape_coding</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
93
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a43">FLAC__stream_encoder_get_do_exhaustive_model_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
94
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a44">FLAC__stream_encoder_get_min_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
95
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a45">FLAC__stream_encoder_get_max_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
96
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a46">FLAC__stream_encoder_get_rice_parameter_search_dist</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
97
<tr><td nowrap align=right valign=top>FLAC__uint64 </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a47">FLAC__stream_encoder_get_total_samples_estimate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
98
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__stream__encoder.html#a52">FLAC__StreamEncoderState</a> </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
99
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
100
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a50">FLAC__stream_encoder_process</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 *const buffer[], unsigned samples)</td></tr>
101
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a51">FLAC__stream_encoder_process_interleaved</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 buffer[], unsigned samples)</td></tr>
102
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
103
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a0">FLAC__StreamEncoderStateString</a> []</td></tr>
104
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__encoder.html#a1">FLAC__StreamEncoderWriteStatusString</a> []</td></tr>
106
<hr><a name="_details"></a><h2>Detailed Description</h2>
107
This module contains the functions which implement the stream encoder.
111
The basic usage of this encoder is as follows:<ul>
112
<li>The program creates an instance of an encoder using <a class="el" href="group__flac__stream__encoder.html#a4">FLAC__stream_encoder_new</a>().<li>The program overrides the default settings and sets callbacks using FLAC__stream_encoder_set_*() functions.<li>The program initializes the instance to validate the settings and prepare for encoding using <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>().<li>The program calls <a class="el" href="group__flac__stream__encoder.html#a50">FLAC__stream_encoder_process</a>() or <a class="el" href="group__flac__stream__encoder.html#a51">FLAC__stream_encoder_process_interleaved</a>() to encode data, which subsequently calls the callbacks when there is encoder data ready to be written.<li>The program finishes the encoding with <a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>(), which causes the encoder to encode any data still in its input pipe, call the metadata callback with the final encoding statistics, and finally reset the encoder to the uninitialized state.<li>The instance may be used again or deleted with <a class="el" href="group__flac__stream__encoder.html#a5">FLAC__stream_encoder_delete</a>().</ul>
113
In more detail, the stream encoder functions similarly to the <a class="el" href="group__flac__stream__decoder.html">stream decoder</a>, but has fewer callbacks and more options. Typically the user will create a new instance by calling <a class="el" href="group__flac__stream__encoder.html#a4">FLAC__stream_encoder_new</a>(), then set the necessary parameters and callbacks with FLAC__stream_encoder_set_*(), and initialize it by calling <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>().
115
Unlike the decoders, the stream encoder has many options that can affect the speed and compression ratio. When setting these parameters you should have some basic knowledge of the format (see the <a href="../documentation.html#format">user-level documentation</a> or the <a href="../format.html">formal description</a>). The FLAC__stream_encoder_set_*() functions themselves do not validate the values as many are interdependent. The <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() function will do this, so make sure to pay attention to the state returned by <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() to make sure that it is FLAC__STREAM_ENCODER_OK. Any parameters that are not set before <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() will take on the defaults from the constructor.
117
The user must provide function pointers for the following callbacks:
120
<li>Write callback - This function is called by the encoder anytime there is raw encoded data to write. It may include metadata mixed with encoded audio frames and the data is not guaranteed to be aligned on frame or metadata block boundaries.<li>Metadata callback - This function is called once at the end of encoding with the populated STREAMINFO structure. This is so file encoders can seek back to the beginning of the file and write the STREAMINFO block with the correct statistics after encoding (like minimum/maximum frame size).</ul>
121
The call to <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block.
123
After initializing the instance, the user may feed audio data to the encoder in one of two ways:
126
<li>Channel separate, through <a class="el" href="group__flac__stream__encoder.html#a50">FLAC__stream_encoder_process</a>() - The user will pass an array of pointers to buffers, one for each channel, to the encoder, each of the same length. The samples need not be block-aligned.<li>Channel interleaved, through <a class="el" href="group__flac__stream__encoder.html#a51">FLAC__stream_encoder_process_interleaved</a>() - The user will pass a single pointer to data that is channel-interleaved (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). Again, the samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be channel0_sample0 and the last value channelN_sampleM.</ul>
127
When the user is finished encoding data, it calls <a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>(), which causes the encoder to encode any data still in its input pipe, and call the metadata callback with the final encoding statistics. Then the instance may be deleted with <a class="el" href="group__flac__stream__encoder.html#a5">FLAC__stream_encoder_delete</a>() or initialized again to encode another stream.
129
For programs that write their own metadata, but that do not know the actual metadata until after encoding, it is advantageous to instruct the encoder to write a PADDING block of the correct size, so that instead of rewriting the whole stream after encoding, the program can just overwrite the PADDING block. If only the maximum size of the metadata is known, the program can write a slightly larger padding block, then split it after encoding.
131
Make sure you understand how lengths are calculated. All FLAC metadata blocks have a 4 byte header which contains the type and length. This length does not include the 4 bytes of the header. See the format page for the specification of metadata blocks and their lengths.
135
The "set" functions may only be called when the encoder is in the state FLAC__STREAM_ENCODER_UNINITIALIZED, i.e. after <a class="el" href="group__flac__stream__encoder.html#a4">FLAC__stream_encoder_new</a>() or <a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>(), but before <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>(). If this is the case they will return <code>true</code>, otherwise <code>false</code>.</dl><dl compact><dt><b>
137
<a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>() resets all settings to the constructor defaults, including the callbacks. </dl><hr><h2>Typedef Documentation</h2>
138
<a name="a2" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteCallback"></a><p>
139
<table width="100%" cellpadding="2" cellspacing="0" border="0">
142
<table cellpadding="0" cellspacing="0" border="0">
144
<td class="md" nowrap valign="top"> typedef <a class="el" href="group__flac__stream__encoder.html#a53">FLAC__StreamEncoderWriteStatus</a>(* FLAC__StreamEncoderWriteCallback)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data)
149
<table cellspacing=5 cellpadding=0 border=0>
157
Signature for the write callback. See <a class="el" href="group__flac__stream__encoder.html#a24">FLAC__stream_encoder_set_write_callback</a>() for more info.<dl compact><dt><b>
159
<table border=0 cellspacing=2 cellpadding=0>
160
<tr><td valign=top><em>encoder</em> </td><td>
161
The encoder instance calling the callback. </td></tr>
162
<tr><td valign=top><em>buffer</em> </td><td>
163
An array of encoded data of length <em>bytes</em>. </td></tr>
164
<tr><td valign=top><em>bytes</em> </td><td>
165
The byte length of <em>buffer</em>. </td></tr>
166
<tr><td valign=top><em>samples</em> </td><td>
167
The number of samples encoded by <em>buffer</em>. <code>0</code> has a special meaning; see <a class="el" href="group__flac__stream__encoder.html#a24">FLAC__stream_encoder_set_write_callback</a>(). </td></tr>
168
<tr><td valign=top><em>current_frame</em> </td><td>
169
The number of the current frame being encoded. </td></tr>
170
<tr><td valign=top><em>client_data</em> </td><td>
171
The callee's client data set through <a class="el" href="group__flac__stream__encoder.html#a26">FLAC__stream_encoder_set_client_data</a>(). </td></tr>
173
</dl><dl compact><dt><b>
174
Return values: </b><dd>
175
<table border=0 cellspacing=2 cellpadding=0>
176
<tr><td valign=top><em>FLAC__StreamEncoderWriteStatus</em> </td><td>
177
The callee's return status. </td></tr>
182
<a name="a3" doxytag="stream_encoder.h::FLAC__StreamEncoderMetadataCallback"></a><p>
183
<table width="100%" cellpadding="2" cellspacing="0" border="0">
186
<table cellpadding="0" cellspacing="0" border="0">
188
<td class="md" nowrap valign="top"> typedef void(* FLAC__StreamEncoderMetadataCallback)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)
193
<table cellspacing=5 cellpadding=0 border=0>
201
Signature for the metadata callback. See <a class="el" href="group__flac__stream__encoder.html#a25">FLAC__stream_encoder_set_metadata_callback</a>() for more info.<dl compact><dt><b>
203
<table border=0 cellspacing=2 cellpadding=0>
204
<tr><td valign=top><em>encoder</em> </td><td>
205
The encoder instance calling the callback. </td></tr>
206
<tr><td valign=top><em>metadata</em> </td><td>
207
The final populated STREAMINFO block. </td></tr>
208
<tr><td valign=top><em>client_data</em> </td><td>
209
The callee's client data set through <a class="el" href="group__flac__stream__encoder.html#a26">FLAC__stream_encoder_set_client_data</a>(). </td></tr>
11
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
12
This module contains the functions which implement the stream encoder.
14
The stream encoder can encode to native FLAC, and optionally Ogg FLAC (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files.<p>
15
The basic usage of this encoder is as follows:<ul>
16
<li>The program creates an instance of an encoder using <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a>.</li><li>The program overrides the default settings using FLAC__stream_encoder_set_*() functions. At a minimum, the following functions should be called:<ul>
17
<li><a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga14">FLAC__stream_encoder_set_ogg_serial_number()</a> (if encoding to Ogg FLAC)</li><li><a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a> (if known)</li></ul>
18
</li><li>If the application wants to control the compression level or set its own metadata, then the following should also be called:<ul>
19
<li><a class="el" href="group__flac__stream__encoder.html#ga20">FLAC__stream_encoder_set_compression_level()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata()</a></li></ul>
20
</li><li>The rest of the set functions should only be called if the client needs exact control over how the audio is compressed; thorough understanding of the FLAC format is necessary to achieve good results.</li><li>The program initializes the instance to validate the settings and prepare for encoding using<ul>
21
<li><a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> or <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a> for native FLAC</li><li><a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> or <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file()</a> for Ogg FLAC</li></ul>
22
</li><li>The program calls <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a> to encode data, which subsequently calls the callbacks when there is encoder data ready to be written.</li><li>The program finishes the encoding with <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, which causes the encoder to encode any data still in its input pipe, update the metadata with the final encoding statistics if output seeking is possible, and finally reset the encoder to the uninitialized state.</li><li>The instance may be used again or deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a>.</li></ul>
24
In more detail, the stream encoder functions similarly to the <a class="el" href="group__flac__stream__decoder.html">stream decoder </a>, but has fewer callbacks and more options. Typically the client will create a new instance by calling <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a>, then set the necessary parameters with FLAC__stream_encoder_set_*(), and initialize it by calling one of the FLAC__stream_encoder_init_*() functions.<p>
25
Unlike the decoders, the stream encoder has many options that can affect the speed and compression ratio. When setting these parameters you should have some basic knowledge of the format (see the <a href="../documentation.html#format">user-level documentation</a> or the <a href="../format.html">formal description</a>). The FLAC__stream_encoder_set_*() functions themselves do not validate the values as many are interdependent. The FLAC__stream_encoder_init_*() functions will do this, so make sure to pay attention to the state returned by FLAC__stream_encoder_init_*() to make sure that it is FLAC__STREAM_ENCODER_INIT_STATUS_OK. Any parameters that are not set before FLAC__stream_encoder_init_*() will take on the defaults from the constructor.<p>
26
There are three initialization functions for native FLAC, one for setting up the encoder to encode FLAC data to the client via callbacks, and two for encoding directly to a file.<p>
27
For encoding via callbacks, use <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a>. You must also supply a write callback which will be called anytime there is raw encoded data to write. If the client can seek the output it is best to also supply seek and tell callbacks, as this allows the encoder to go back after encoding is finished to write back information that was collected while encoding, like seek point offsets, frame sizes, etc.<p>
28
For encoding directly to a file, use <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a>. Then you must only supply a filename or open <code>FILE*</code>; the encoder will handle all the callbacks internally. You may also supply a progress callback for periodic notification of the encoding progress.<p>
29
There are three similarly-named init functions for encoding to Ogg FLAC streams. Check <code>FLAC_API_SUPPORTS_OGG_FLAC</code> to find out if the library has been built with Ogg support.<p>
30
The call to FLAC__stream_encoder_init_*() currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block. Note that for Ogg FLAC encoding you will usually get at least twice the number of callbacks than with native FLAC, one for the Ogg page header and one for the page body.<p>
31
After initializing the instance, the client may feed audio data to the encoder in one of two ways:<p>
33
<li>Channel separate, through <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> - The client will pass an array of pointers to buffers, one for each channel, to the encoder, each of the same length. The samples need not be block-aligned, but each channel should have the same number of samples.</li><li>Channel interleaved, through <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a> - The client will pass a single pointer to data that is channel-interleaved (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). Again, the samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be channel0_sample0 and the last value channelN_sampleM.</li></ul>
35
Note that for either process call, each sample in the buffers should be a signed integer, right-justified to the resolution set by <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].<p>
36
When the client is finished encoding data, it calls <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, which causes the encoder to encode any data still in its input pipe, and call the metadata callback with the final encoding statistics. Then the instance may be deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a> or initialized again to encode another stream.<p>
37
For programs that write their own metadata, but that do not know the actual metadata until after encoding, it is advantageous to instruct the encoder to write a PADDING block of the correct size, so that instead of rewriting the whole stream after encoding, the program can just overwrite the PADDING block. If only the maximum size of the metadata is known, the program can write a slightly larger padding block, then split it after encoding.<p>
38
Make sure you understand how lengths are calculated. All FLAC metadata blocks have a 4 byte header which contains the type and length. This length does not include the 4 bytes of the header. See the format page for the specification of metadata blocks and their lengths.<p>
39
<dl compact><dt><b>Note:</b></dt><dd>If you are writing the FLAC data to a file via callbacks, make sure it is open for update (e.g. mode "w+" for stdio streams). This is because after the first encoding pass, the encoder will try to seek back to the beginning of the stream, to the STREAMINFO block, to write some data there. (If using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE(), the file is managed internally.)<p>
40
The "set" functions may only be called when the encoder is in the state FLAC__STREAM_ENCODER_UNINITIALIZED, i.e. after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> or <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, but before FLAC__stream_encoder_init_*(). If this is the case they will return <code>true</code>, otherwise <code>false</code>.<p>
41
<a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> resets all settings to the constructor defaults. </dd></dl>
44
<table border="0" cellpadding="0" cellspacing="0">
46
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a></td></tr>
49
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
50
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)</td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)</td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)</td></tr>
56
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)</td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)</td></tr>
60
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data)</td></tr>
62
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> { <br>
64
<a class="el" href="group__flac__stream__encoder.html#gga65a12">FLAC__STREAM_ENCODER_OK</a> = 0,
65
<a class="el" href="group__flac__stream__encoder.html#gga65a13">FLAC__STREAM_ENCODER_UNINITIALIZED</a>,
66
<a class="el" href="group__flac__stream__encoder.html#gga65a14">FLAC__STREAM_ENCODER_OGG_ERROR</a>,
67
<a class="el" href="group__flac__stream__encoder.html#gga65a15">FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</a>,
69
<a class="el" href="group__flac__stream__encoder.html#gga65a16">FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</a>,
70
<a class="el" href="group__flac__stream__encoder.html#gga65a17">FLAC__STREAM_ENCODER_CLIENT_ERROR</a>,
71
<a class="el" href="group__flac__stream__encoder.html#gga65a18">FLAC__STREAM_ENCODER_IO_ERROR</a>,
72
<a class="el" href="group__flac__stream__encoder.html#gga65a19">FLAC__STREAM_ENCODER_FRAMING_ERROR</a>,
74
<a class="el" href="group__flac__stream__encoder.html#gga65a20">FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</a>
78
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> { <br>
79
<a class="el" href="group__flac__stream__encoder.html#gga66a21">FLAC__STREAM_ENCODER_INIT_STATUS_OK</a> = 0,
80
<a class="el" href="group__flac__stream__encoder.html#gga66a22">FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR</a>,
81
<a class="el" href="group__flac__stream__encoder.html#gga66a23">FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER</a>,
82
<a class="el" href="group__flac__stream__encoder.html#gga66a24">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS</a>,
84
<a class="el" href="group__flac__stream__encoder.html#gga66a25">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS</a>,
85
<a class="el" href="group__flac__stream__encoder.html#gga66a26">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE</a>,
86
<a class="el" href="group__flac__stream__encoder.html#gga66a27">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE</a>,
87
<a class="el" href="group__flac__stream__encoder.html#gga66a28">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE</a>,
89
<a class="el" href="group__flac__stream__encoder.html#gga66a29">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER</a>,
90
<a class="el" href="group__flac__stream__encoder.html#gga66a30">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION</a>,
91
<a class="el" href="group__flac__stream__encoder.html#gga66a31">FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</a>,
92
<a class="el" href="group__flac__stream__encoder.html#gga66a32">FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE</a>,
94
<a class="el" href="group__flac__stream__encoder.html#gga66a33">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA</a>,
95
<a class="el" href="group__flac__stream__encoder.html#gga66a34">FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED</a>
99
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga67a35">FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</a>,
100
<a class="el" href="group__flac__stream__encoder.html#gga67a36">FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</a>,
101
<a class="el" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>,
102
<a class="el" href="group__flac__stream__encoder.html#gga67a38">FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED</a>
105
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga68a39">FLAC__STREAM_ENCODER_WRITE_STATUS_OK</a> = 0,
106
<a class="el" href="group__flac__stream__encoder.html#gga68a40">FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</a>
109
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga69a41">FLAC__STREAM_ENCODER_SEEK_STATUS_OK</a>,
110
<a class="el" href="group__flac__stream__encoder.html#gga69a42">FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</a>,
111
<a class="el" href="group__flac__stream__encoder.html#gga69a43">FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</a>
114
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga70a44">FLAC__STREAM_ENCODER_TELL_STATUS_OK</a>,
115
<a class="el" href="group__flac__stream__encoder.html#gga70a45">FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</a>,
116
<a class="el" href="group__flac__stream__encoder.html#gga70a46">FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</a>
119
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
120
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new</a> (void)</td></tr>
122
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
124
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga14">FLAC__stream_encoder_set_ogg_serial_number</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, long serial_number)</td></tr>
126
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
128
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga16">FLAC__stream_encoder_set_streamable_subset</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
130
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
132
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
134
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
136
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga20">FLAC__stream_encoder_set_compression_level</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
138
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga21">FLAC__stream_encoder_set_blocksize</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
140
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
142
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
144
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga24">FLAC__stream_encoder_set_apodization</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *specification)</td></tr>
146
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
148
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
150
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
152
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
154
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>
156
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
158
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
160
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>
162
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 value)</td></tr>
164
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **metadata, unsigned num_blocks)</td></tr>
166
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
168
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga36">FLAC__stream_encoder_get_verify_decoder_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
170
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga37">FLAC__stream_encoder_get_resolved_state_string</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
172
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga38">FLAC__stream_encoder_get_verify_decoder_error_stats</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got)</td></tr>
174
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga39">FLAC__stream_encoder_get_verify</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
176
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga40">FLAC__stream_encoder_get_streamable_subset</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
178
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga41">FLAC__stream_encoder_get_channels</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
180
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga42">FLAC__stream_encoder_get_bits_per_sample</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
182
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga43">FLAC__stream_encoder_get_sample_rate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
184
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga44">FLAC__stream_encoder_get_blocksize</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
186
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga45">FLAC__stream_encoder_get_do_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
188
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga46">FLAC__stream_encoder_get_loose_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
190
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga47">FLAC__stream_encoder_get_max_lpc_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
192
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga48">FLAC__stream_encoder_get_qlp_coeff_precision</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
194
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga49">FLAC__stream_encoder_get_do_qlp_coeff_prec_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
196
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga50">FLAC__stream_encoder_get_do_escape_coding</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
198
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga51">FLAC__stream_encoder_get_do_exhaustive_model_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
200
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga52">FLAC__stream_encoder_get_min_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
202
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga53">FLAC__stream_encoder_get_max_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
204
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga54">FLAC__stream_encoder_get_rice_parameter_search_dist</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
206
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__uint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga55">FLAC__stream_encoder_get_total_samples_estimate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
208
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> metadata_callback, void *client_data)</td></tr>
210
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a> read_callback, <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> metadata_callback, void *client_data)</td></tr>
212
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FILE *file, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>
214
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FILE *file, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>
216
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *filename, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>
218
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *filename, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>
220
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>
222
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 *const buffer[], unsigned samples)</td></tr>
224
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 buffer[], unsigned samples)</td></tr>
226
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
227
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga0">FLAC__StreamEncoderStateString</a> []</td></tr>
229
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga1">FLAC__StreamEncoderInitStatusString</a> []</td></tr>
231
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga2">FLAC__StreamEncoderReadStatusString</a> []</td></tr>
233
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga3">FLAC__StreamEncoderWriteStatusString</a> []</td></tr>
235
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga4">FLAC__StreamEncoderSeekStatusString</a> []</td></tr>
237
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga5">FLAC__StreamEncoderTellStatusString</a> []</td></tr>
240
<hr><h2>Typedef Documentation</h2>
241
<a class="anchor" name="ga6" doxytag="stream_encoder.h::FLAC__StreamEncoderReadCallback"></a><p>
242
<table class="mdTable" cellpadding="2" cellspacing="0">
245
<table cellpadding="0" cellspacing="0" border="0">
247
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data) </td>
253
<table cellspacing="5" cellpadding="0" border="0">
261
Signature for the read callback.<p>
262
A function pointer matching this signature must be passed to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> if seeking is supported. The supplied function will be called when the encoder needs to read back encoded data. This happens during the metadata callback, when the encoder has to read, modify, and rewrite the metadata (e.g. seekpoints) gathered while encoding. The address of the buffer to be filled is supplied, along with the number of bytes the buffer can hold. The callback may choose to supply less data and modify the byte count but must be careful not to overflow the buffer. The callback then returns a status code chosen from FLAC__StreamEncoderReadStatus.<p>
263
Here is an example of a read callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a> read_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, <span class="keywordtype">void</span> *client_data)
265
FILE *file = ((MyClientData*)client_data)->file;
266
<span class="keywordflow">if</span>(*bytes > 0) {
267
*bytes = fread(buffer, <span class="keyword">sizeof</span>(FLAC__byte), *bytes, file);
268
<span class="keywordflow">if</span>(ferror(file))
269
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>;
270
<span class="keywordflow">else</span> <span class="keywordflow">if</span>(*bytes == 0)
271
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a36">FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</a>;
272
<span class="keywordflow">else</span>
273
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a35">FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</a>;
275
<span class="keywordflow">else</span>
276
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>;
279
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
280
<dl compact><dt><b>Parameters:</b></dt><dd>
281
<table border="0" cellspacing="2" cellpadding="0">
282
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
283
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A pointer to a location for the callee to store data to be encoded. </td></tr>
284
<tr><td valign="top"></td><td valign="top"><em>bytes</em> </td><td>A pointer to the size of the buffer. On entry to the callback, it contains the maximum number of bytes that may be stored in <em>buffer</em>. The callee must set it to the actual number of bytes stored (0 in case of error or end-of-stream) before returning. </td></tr>
285
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_set_client_data(). </td></tr>
288
<dl compact><dt><b>Return values:</b></dt><dd>
289
<table border="0" cellspacing="2" cellpadding="0">
290
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderReadStatus</em> </td><td>The callee's return status. </td></tr>
296
<a class="anchor" name="ga7" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteCallback"></a><p>
297
<table class="mdTable" cellpadding="2" cellspacing="0">
300
<table cellpadding="0" cellspacing="0" border="0">
302
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) </td>
308
<table cellspacing="5" cellpadding="0" border="0">
316
Signature for the write callback.<p>
317
A function pointer matching this signature must be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called by the encoder anytime there is raw encoded data ready to write. It may include metadata mixed with encoded audio frames and the data is not guaranteed to be aligned on frame or metadata block boundaries.<p>
318
The only duty of the callback is to write out the <em>bytes</em> worth of data in <em>buffer</em> to the current position in the output stream. The arguments <em>samples</em> and <em>current_frame</em> are purely informational. If <em>samples</em> is greater than <code>0</code>, then <em>current_frame</em> will hold the current frame number that is being written; otherwise it indicates that the write callback is being called to write metadata.<p>
319
<dl compact><dt><b>Note:</b></dt><dd>Unlike when writing to native FLAC, when writing to Ogg FLAC the write callback will be called twice when writing each audio frame; once for the page header, and once for the page body. When writing the page header, the <em>samples</em> argument to the write callback will be <code>0</code>.<p>
320
In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
321
<dl compact><dt><b>Parameters:</b></dt><dd>
322
<table border="0" cellspacing="2" cellpadding="0">
323
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
324
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>An array of encoded data of length <em>bytes</em>. </td></tr>
325
<tr><td valign="top"></td><td valign="top"><em>bytes</em> </td><td>The byte length of <em>buffer</em>. </td></tr>
326
<tr><td valign="top"></td><td valign="top"><em>samples</em> </td><td>The number of samples encoded by <em>buffer</em>. <code>0</code> has a special meaning; see above. </td></tr>
327
<tr><td valign="top"></td><td valign="top"><em>current_frame</em> </td><td>The number of the current frame being encoded. </td></tr>
328
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
331
<dl compact><dt><b>Return values:</b></dt><dd>
332
<table border="0" cellspacing="2" cellpadding="0">
333
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderWriteStatus</em> </td><td>The callee's return status. </td></tr>
339
<a class="anchor" name="ga8" doxytag="stream_encoder.h::FLAC__StreamEncoderSeekCallback"></a><p>
340
<table class="mdTable" cellpadding="2" cellspacing="0">
343
<table cellpadding="0" cellspacing="0" border="0">
345
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, void *client_data) </td>
351
<table cellspacing="5" cellpadding="0" border="0">
359
Signature for the seek callback.<p>
360
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called when the encoder needs to seek the output stream. The encoder will pass the absolute byte offset to seek to, 0 meaning the beginning of the stream.<p>
361
Here is an example of a seek callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a> seek_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
363
FILE *file = ((MyClientData*)client_data)->file;
364
<span class="keywordflow">if</span>(file == stdin)
365
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a43">FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</a>;
366
<span class="keywordflow">else</span> <span class="keywordflow">if</span>(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0)
367
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a42">FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</a>;
368
<span class="keywordflow">else</span>
369
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a41">FLAC__STREAM_ENCODER_SEEK_STATUS_OK</a>;
372
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
373
<dl compact><dt><b>Parameters:</b></dt><dd>
374
<table border="0" cellspacing="2" cellpadding="0">
375
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
376
<tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em> </td><td>The offset from the beginning of the stream to seek to. </td></tr>
377
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
380
<dl compact><dt><b>Return values:</b></dt><dd>
381
<table border="0" cellspacing="2" cellpadding="0">
382
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderSeekStatus</em> </td><td>The callee's return status. </td></tr>
388
<a class="anchor" name="ga9" doxytag="stream_encoder.h::FLAC__StreamEncoderTellCallback"></a><p>
389
<table class="mdTable" cellpadding="2" cellspacing="0">
392
<table cellpadding="0" cellspacing="0" border="0">
394
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data) </td>
400
<table cellspacing="5" cellpadding="0" border="0">
408
Signature for the tell callback.<p>
409
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called when the encoder needs to know the current position of the output stream.<p>
410
<dl compact><dt><b>Warning:</b></dt><dd>The callback must return the true current byte offset of the output to which the encoder is writing. If you are buffering the output, make sure and take this into account. If you are writing directly to a FILE* from your write callback, ftell() is sufficient. If you are writing directly to a file descriptor from your write callback, you can use lseek(fd, SEEK_CUR, 0). The encoder may later seek back to these points to rewrite metadata after encoding.</dd></dl>
411
Here is an example of a tell callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a> tell_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
413
FILE *file = ((MyClientData*)client_data)->file;
415
<span class="keywordflow">if</span>(file == stdin)
416
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a46">FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</a>;
417
<span class="keywordflow">else</span> <span class="keywordflow">if</span>((pos = ftello(file)) < 0)
418
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a45">FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</a>;
419
<span class="keywordflow">else</span> {
420
*absolute_byte_offset = (FLAC__uint64)pos;
421
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a44">FLAC__STREAM_ENCODER_TELL_STATUS_OK</a>;
425
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
426
<dl compact><dt><b>Parameters:</b></dt><dd>
427
<table border="0" cellspacing="2" cellpadding="0">
428
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
429
<tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em> </td><td>The address at which to store the current position of the output. </td></tr>
430
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
433
<dl compact><dt><b>Return values:</b></dt><dd>
434
<table border="0" cellspacing="2" cellpadding="0">
435
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderTellStatus</em> </td><td>The callee's return status. </td></tr>
441
<a class="anchor" name="ga10" doxytag="stream_encoder.h::FLAC__StreamEncoderMetadataCallback"></a><p>
442
<table class="mdTable" cellpadding="2" cellspacing="0">
445
<table cellpadding="0" cellspacing="0" border="0">
447
<td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data) </td>
453
<table cellspacing="5" cellpadding="0" border="0">
461
Signature for the metadata callback.<p>
462
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called once at the end of encoding with the populated STREAMINFO structure. This is so the client can seek back to the beginning of the file and write the STREAMINFO block with the correct statistics after encoding (like minimum/maximum frame size and total samples).<p>
463
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
464
<dl compact><dt><b>Parameters:</b></dt><dd>
465
<table border="0" cellspacing="2" cellpadding="0">
466
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
467
<tr><td valign="top"></td><td valign="top"><em>metadata</em> </td><td>The final populated STREAMINFO block. </td></tr>
468
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
474
<a class="anchor" name="ga11" doxytag="stream_encoder.h::FLAC__StreamEncoderProgressCallback"></a><p>
475
<table class="mdTable" cellpadding="2" cellspacing="0">
478
<table cellpadding="0" cellspacing="0" border="0">
480
<td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data) </td>
486
<table cellspacing="5" cellpadding="0" border="0">
494
Signature for the progress callback.<p>
495
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE(). The supplied function will be called when the encoder has finished writing a frame. The <code>total_frames_estimate</code> argument to the callback will be based on the value from <a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a>.<p>
496
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
497
<dl compact><dt><b>Parameters:</b></dt><dd>
498
<table border="0" cellspacing="2" cellpadding="0">
499
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>The encoder instance calling the callback. </td></tr>
500
<tr><td valign="top"></td><td valign="top"><em>bytes_written</em> </td><td>Bytes written so far. </td></tr>
501
<tr><td valign="top"></td><td valign="top"><em>samples_written</em> </td><td>Samples written so far. </td></tr>
502
<tr><td valign="top"></td><td valign="top"><em>frames_written</em> </td><td>Frames written so far. </td></tr>
503
<tr><td valign="top"></td><td valign="top"><em>total_frames_estimate</em> </td><td>The estimate of the total number of frames to be written. </td></tr>
504
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
214
510
<hr><h2>Enumeration Type Documentation</h2>
215
<a name="a52" doxytag="stream_encoder.h::FLAC__StreamEncoderState"></a><p>
216
<table width="100%" cellpadding="2" cellspacing="0" border="0">
511
<a class="anchor" name="ga65" doxytag="stream_encoder.h::FLAC__StreamEncoderState"></a><p>
512
<table class="mdTable" cellpadding="2" cellspacing="0">
219
515
<table cellpadding="0" cellspacing="0" border="0">
221
<td class="md" nowrap valign="top"> enum FLAC__StreamEncoderState
517
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> </td>
226
<table cellspacing=5 cellpadding=0 border=0>
523
<table cellspacing="5" cellpadding="0" border="0">
234
State values for a <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>
236
The encoder's state can be obtained by calling <a class="el" href="group__flac__stream__encoder.html#a27">FLAC__stream_encoder_get_state</a>(). <dl compact><dt><b>
237
Enumeration values:</b><dd>
238
<table border=0 cellspacing=2 cellpadding=0>
239
<tr><td valign=top><em><a name="a52a4" doxytag="FLAC__STREAM_ENCODER_OK"></a><em>FLAC__STREAM_ENCODER_OK</em></em> </td><td>
240
The encoder is in the normal OK state. </td></tr>
241
<tr><td valign=top><em><a name="a52a5" doxytag="FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR"></a><em>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</em></em> </td><td>
242
An error occurred in the underlying verify stream decoder; check <a class="el" href="group__flac__stream__encoder.html#a28">FLAC__stream_encoder_get_verify_decoder_state</a>(). </td></tr>
243
<tr><td valign=top><em><a name="a52a6" doxytag="FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"></a><em>FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</em></em> </td><td>
531
State values for a <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>.<p>
532
The encoder's state can be obtained by calling <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a>.<p>
533
If the encoder gets into any other state besides <code>FLAC__STREAM_ENCODER_OK</code> or <code>FLAC__STREAM_ENCODER_UNINITIALIZED</code>, it becomes invalid for encoding and must be deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd>
534
<table border="0" cellspacing="2" cellpadding="0">
535
<tr><td valign="top"><em><a class="anchor" name="gga65a12" doxytag="FLAC__STREAM_ENCODER_OK"></a>FLAC__STREAM_ENCODER_OK</em> </td><td>
536
The encoder is in the normal OK state and samples can be processed. </td></tr>
537
<tr><td valign="top"><em><a class="anchor" name="gga65a13" doxytag="FLAC__STREAM_ENCODER_UNINITIALIZED"></a>FLAC__STREAM_ENCODER_UNINITIALIZED</em> </td><td>
538
The encoder is in the uninitialized state; one of the FLAC__stream_encoder_init_*() functions must be called before samples can be processed. </td></tr>
539
<tr><td valign="top"><em><a class="anchor" name="gga65a14" doxytag="FLAC__STREAM_ENCODER_OGG_ERROR"></a>FLAC__STREAM_ENCODER_OGG_ERROR</em> </td><td>
540
An error occurred in the underlying Ogg layer. </td></tr>
541
<tr><td valign="top"><em><a class="anchor" name="gga65a15" doxytag="FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR"></a>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</em> </td><td>
542
An error occurred in the underlying verify stream decoder; check <a class="el" href="group__flac__stream__encoder.html#ga36">FLAC__stream_encoder_get_verify_decoder_state()</a>. </td></tr>
543
<tr><td valign="top"><em><a class="anchor" name="gga65a16" doxytag="FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"></a>FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</em> </td><td>
244
544
The verify decoder detected a mismatch between the original audio signal and the decoded audio signal. </td></tr>
245
<tr><td valign=top><em><a name="a52a7" doxytag="FLAC__STREAM_ENCODER_INVALID_CALLBACK"></a><em>FLAC__STREAM_ENCODER_INVALID_CALLBACK</em></em> </td><td>
246
The encoder was initialized before setting all the required callbacks. </td></tr>
247
<tr><td valign=top><em><a name="a52a8" doxytag="FLAC__STREAM_ENCODER_INVALID_NUMBER_OF_CHANNELS"></a><em>FLAC__STREAM_ENCODER_INVALID_NUMBER_OF_CHANNELS</em></em> </td><td>
545
<tr><td valign="top"><em><a class="anchor" name="gga65a17" doxytag="FLAC__STREAM_ENCODER_CLIENT_ERROR"></a>FLAC__STREAM_ENCODER_CLIENT_ERROR</em> </td><td>
546
One of the callbacks returned a fatal error. </td></tr>
547
<tr><td valign="top"><em><a class="anchor" name="gga65a18" doxytag="FLAC__STREAM_ENCODER_IO_ERROR"></a>FLAC__STREAM_ENCODER_IO_ERROR</em> </td><td>
548
An I/O error occurred while opening/reading/writing a file. Check <code>errno</code>. </td></tr>
549
<tr><td valign="top"><em><a class="anchor" name="gga65a19" doxytag="FLAC__STREAM_ENCODER_FRAMING_ERROR"></a>FLAC__STREAM_ENCODER_FRAMING_ERROR</em> </td><td>
550
An error occurred while writing the stream; usually, the write_callback returned an error. </td></tr>
551
<tr><td valign="top"><em><a class="anchor" name="gga65a20" doxytag="FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR"></a>FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</em> </td><td>
552
Memory allocation failed. </td></tr>
558
<a class="anchor" name="ga66" doxytag="stream_encoder.h::FLAC__StreamEncoderInitStatus"></a><p>
559
<table class="mdTable" cellpadding="2" cellspacing="0">
562
<table cellpadding="0" cellspacing="0" border="0">
564
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> </td>
570
<table cellspacing="5" cellpadding="0" border="0">
578
Possible return values for the FLAC__stream_encoder_init_*() functions. <dl compact><dt><b>Enumeration values: </b></dt><dd>
579
<table border="0" cellspacing="2" cellpadding="0">
580
<tr><td valign="top"><em><a class="anchor" name="gga66a21" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_OK"></a>FLAC__STREAM_ENCODER_INIT_STATUS_OK</em> </td><td>
581
Initialization was successful. </td></tr>
582
<tr><td valign="top"><em><a class="anchor" name="gga66a22" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR"></a>FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR</em> </td><td>
583
General failure to set up encoder; call <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> for cause. </td></tr>
584
<tr><td valign="top"><em><a class="anchor" name="gga66a23" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER</em> </td><td>
585
The library was not compiled with support for the given container format. </td></tr>
586
<tr><td valign="top"><em><a class="anchor" name="gga66a24" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS</em> </td><td>
587
A required callback was not supplied. </td></tr>
588
<tr><td valign="top"><em><a class="anchor" name="gga66a25" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS</em> </td><td>
248
589
The encoder has an invalid setting for number of channels. </td></tr>
249
<tr><td valign=top><em><a name="a52a9" doxytag="FLAC__STREAM_ENCODER_INVALID_BITS_PER_SAMPLE"></a><em>FLAC__STREAM_ENCODER_INVALID_BITS_PER_SAMPLE</em></em> </td><td>
590
<tr><td valign="top"><em><a class="anchor" name="gga66a26" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE</em> </td><td>
250
591
The encoder has an invalid setting for bits-per-sample. FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps. </td></tr>
251
<tr><td valign=top><em><a name="a52a10" doxytag="FLAC__STREAM_ENCODER_INVALID_SAMPLE_RATE"></a><em>FLAC__STREAM_ENCODER_INVALID_SAMPLE_RATE</em></em> </td><td>
592
<tr><td valign="top"><em><a class="anchor" name="gga66a27" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE</em> </td><td>
252
593
The encoder has an invalid setting for the input sample rate. </td></tr>
253
<tr><td valign=top><em><a name="a52a11" doxytag="FLAC__STREAM_ENCODER_INVALID_BLOCK_SIZE"></a><em>FLAC__STREAM_ENCODER_INVALID_BLOCK_SIZE</em></em> </td><td>
594
<tr><td valign="top"><em><a class="anchor" name="gga66a28" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE</em> </td><td>
254
595
The encoder has an invalid setting for the block size. </td></tr>
255
<tr><td valign=top><em><a name="a52a12" doxytag="FLAC__STREAM_ENCODER_INVALID_MAX_LPC_ORDER"></a><em>FLAC__STREAM_ENCODER_INVALID_MAX_LPC_ORDER</em></em> </td><td>
596
<tr><td valign="top"><em><a class="anchor" name="gga66a29" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER</em> </td><td>
256
597
The encoder has an invalid setting for the maximum LPC order. </td></tr>
257
<tr><td valign=top><em><a name="a52a13" doxytag="FLAC__STREAM_ENCODER_INVALID_QLP_COEFF_PRECISION"></a><em>FLAC__STREAM_ENCODER_INVALID_QLP_COEFF_PRECISION</em></em> </td><td>
598
<tr><td valign="top"><em><a class="anchor" name="gga66a30" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION</em> </td><td>
258
599
The encoder has an invalid setting for the precision of the quantized linear predictor coefficients. </td></tr>
259
<tr><td valign=top><em><a name="a52a14" doxytag="FLAC__STREAM_ENCODER_MID_SIDE_CHANNELS_MISMATCH"></a><em>FLAC__STREAM_ENCODER_MID_SIDE_CHANNELS_MISMATCH</em></em> </td><td>
260
Mid/side coding was specified but the number of channels is not equal to 2. </td></tr>
261
<tr><td valign=top><em><a name="a52a15" doxytag="FLAC__STREAM_ENCODER_MID_SIDE_SAMPLE_SIZE_MISMATCH"></a><em>FLAC__STREAM_ENCODER_MID_SIDE_SAMPLE_SIZE_MISMATCH</em></em> </td><td>
262
Deprecated. </td></tr>
263
<tr><td valign=top><em><a name="a52a16" doxytag="FLAC__STREAM_ENCODER_ILLEGAL_MID_SIDE_FORCE"></a><em>FLAC__STREAM_ENCODER_ILLEGAL_MID_SIDE_FORCE</em></em> </td><td>
264
Loose mid/side coding was specified but mid/side coding was not. </td></tr>
265
<tr><td valign=top><em><a name="a52a17" doxytag="FLAC__STREAM_ENCODER_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER"></a><em>FLAC__STREAM_ENCODER_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</em></em> </td><td>
600
<tr><td valign="top"><em><a class="anchor" name="gga66a31" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</em> </td><td>
266
601
The specified block size is less than the maximum LPC order. </td></tr>
267
<tr><td valign=top><em><a name="a52a18" doxytag="FLAC__STREAM_ENCODER_NOT_STREAMABLE"></a><em>FLAC__STREAM_ENCODER_NOT_STREAMABLE</em></em> </td><td>
268
The encoder is bound to the "streamable subset" but other settings violate it. </td></tr>
269
<tr><td valign=top><em><a name="a52a19" doxytag="FLAC__STREAM_ENCODER_FRAMING_ERROR"></a><em>FLAC__STREAM_ENCODER_FRAMING_ERROR</em></em> </td><td>
270
An error occurred while writing the stream; usually, the write_callback returned an error. </td></tr>
271
<tr><td valign=top><em><a name="a52a20" doxytag="FLAC__STREAM_ENCODER_INVALID_METADATA"></a><em>FLAC__STREAM_ENCODER_INVALID_METADATA</em></em> </td><td>
602
<tr><td valign="top"><em><a class="anchor" name="gga66a32" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE</em> </td><td>
603
The encoder is bound to the <a href="../format.html#subset">Subset</a> but other settings violate it. </td></tr>
604
<tr><td valign="top"><em><a class="anchor" name="gga66a33" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA</em> </td><td>
272
605
The metadata input to the encoder is invalid, in one of the following ways:<ul>
273
<li><a class="el" href="group__flac__stream__encoder.html#a23">FLAC__stream_encoder_set_metadata</a>() was called with a null pointer but a block count > 0<li>One of the metadata blocks contains an undefined type<li>It contains an illegal CUESHEET as checked by <a class="el" href="group__flac__format.html#a74">FLAC__format_cuesheet_is_legal</a>()<li>It contains an illegal SEEKTABLE as checked by <a class="el" href="group__flac__format.html#a72">FLAC__format_seektable_is_legal</a>()<li>It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block </ul>
606
<li><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata()</a> was called with a null pointer but a block count > 0</li><li>One of the metadata blocks contains an undefined type</li><li>It contains an illegal CUESHEET as checked by <a class="el" href="group__flac__format.html#ga83">FLAC__format_cuesheet_is_legal()</a></li><li>It contains an illegal SEEKTABLE as checked by <a class="el" href="group__flac__format.html#ga81">FLAC__format_seektable_is_legal()</a></li><li>It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block </li></ul>
275
<tr><td valign=top><em><a name="a52a21" doxytag="FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_ENCODING"></a><em>FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_ENCODING</em></em> </td><td>
276
An error occurred while writing the stream; usually, the write_callback returned an error. </td></tr>
277
<tr><td valign=top><em><a name="a52a22" doxytag="FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_WRITING"></a><em>FLAC__STREAM_ENCODER_FATAL_ERROR_WHILE_WRITING</em></em> </td><td>
278
The write_callback returned an error. </td></tr>
279
<tr><td valign=top><em><a name="a52a23" doxytag="FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR"></a><em>FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</em></em> </td><td>
280
Memory allocation failed. </td></tr>
281
<tr><td valign=top><em><a name="a52a24" doxytag="FLAC__STREAM_ENCODER_ALREADY_INITIALIZED"></a><em>FLAC__STREAM_ENCODER_ALREADY_INITIALIZED</em></em> </td><td>
282
<a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() was called when the encoder was already initialized, usually because <a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>() was not called. </td></tr>
283
<tr><td valign=top><em><a name="a52a25" doxytag="FLAC__STREAM_ENCODER_UNINITIALIZED"></a><em>FLAC__STREAM_ENCODER_UNINITIALIZED</em></em> </td><td>
284
The encoder is in the uninitialized state. </td></tr>
290
<a name="a53" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteStatus"></a><p>
291
<table width="100%" cellpadding="2" cellspacing="0" border="0">
294
<table cellpadding="0" cellspacing="0" border="0">
296
<td class="md" nowrap valign="top"> enum FLAC__StreamEncoderWriteStatus
301
<table cellspacing=5 cellpadding=0 border=0>
309
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> write callback. <dl compact><dt><b>
310
Enumeration values:</b><dd>
311
<table border=0 cellspacing=2 cellpadding=0>
312
<tr><td valign=top><em><a name="a53a26" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_OK"></a><em>FLAC__STREAM_ENCODER_WRITE_STATUS_OK</em></em> </td><td>
608
<tr><td valign="top"><em><a class="anchor" name="gga66a34" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED"></a>FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED</em> </td><td>
609
FLAC__stream_encoder_init_*() was called when the encoder was already initialized, usually because <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> was not called.</td></tr>
615
<a class="anchor" name="ga67" doxytag="stream_encoder.h::FLAC__StreamEncoderReadStatus"></a><p>
616
<table class="mdTable" cellpadding="2" cellspacing="0">
619
<table cellpadding="0" cellspacing="0" border="0">
621
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a> </td>
627
<table cellspacing="5" cellpadding="0" border="0">
635
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> read callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
636
<table border="0" cellspacing="2" cellpadding="0">
637
<tr><td valign="top"><em><a class="anchor" name="gga67a35" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE"></a>FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</em> </td><td>
638
The read was OK and decoding can continue. </td></tr>
639
<tr><td valign="top"><em><a class="anchor" name="gga67a36" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM"></a>FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</em> </td><td>
640
The read was attempted at the end of the stream. </td></tr>
641
<tr><td valign="top"><em><a class="anchor" name="gga67a37" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_ABORT"></a>FLAC__STREAM_ENCODER_READ_STATUS_ABORT</em> </td><td>
642
An unrecoverable error occurred. </td></tr>
643
<tr><td valign="top"><em><a class="anchor" name="gga67a38" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED</em> </td><td>
644
Client does not support reading back from the output. </td></tr>
650
<a class="anchor" name="ga68" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteStatus"></a><p>
651
<table class="mdTable" cellpadding="2" cellspacing="0">
654
<table cellpadding="0" cellspacing="0" border="0">
656
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a> </td>
662
<table cellspacing="5" cellpadding="0" border="0">
670
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> write callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
671
<table border="0" cellspacing="2" cellpadding="0">
672
<tr><td valign="top"><em><a class="anchor" name="gga68a39" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_OK"></a>FLAC__STREAM_ENCODER_WRITE_STATUS_OK</em> </td><td>
313
673
The write was OK and encoding can continue. </td></tr>
314
<tr><td valign=top><em><a name="a53a27" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR"></a><em>FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</em></em> </td><td>
674
<tr><td valign="top"><em><a class="anchor" name="gga68a40" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR"></a>FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</em> </td><td>
315
675
An unrecoverable error occurred. The encoder will return from the process call. </td></tr>
681
<a class="anchor" name="ga69" doxytag="stream_encoder.h::FLAC__StreamEncoderSeekStatus"></a><p>
682
<table class="mdTable" cellpadding="2" cellspacing="0">
685
<table cellpadding="0" cellspacing="0" border="0">
687
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a> </td>
693
<table cellspacing="5" cellpadding="0" border="0">
701
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> seek callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
702
<table border="0" cellspacing="2" cellpadding="0">
703
<tr><td valign="top"><em><a class="anchor" name="gga69a41" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_OK"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_OK</em> </td><td>
704
The seek was OK and encoding can continue. </td></tr>
705
<tr><td valign="top"><em><a class="anchor" name="gga69a42" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</em> </td><td>
706
An unrecoverable error occurred. </td></tr>
707
<tr><td valign="top"><em><a class="anchor" name="gga69a43" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</em> </td><td>
708
Client does not support seeking. </td></tr>
714
<a class="anchor" name="ga70" doxytag="stream_encoder.h::FLAC__StreamEncoderTellStatus"></a><p>
715
<table class="mdTable" cellpadding="2" cellspacing="0">
718
<table cellpadding="0" cellspacing="0" border="0">
720
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a> </td>
726
<table cellspacing="5" cellpadding="0" border="0">
734
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> tell callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
735
<table border="0" cellspacing="2" cellpadding="0">
736
<tr><td valign="top"><em><a class="anchor" name="gga70a44" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_OK"></a>FLAC__STREAM_ENCODER_TELL_STATUS_OK</em> </td><td>
737
The tell was OK and encoding can continue. </td></tr>
738
<tr><td valign="top"><em><a class="anchor" name="gga70a45" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_ERROR"></a>FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</em> </td><td>
739
An unrecoverable error occurred. </td></tr>
740
<tr><td valign="top"><em><a class="anchor" name="gga70a46" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</em> </td><td>
741
Client does not support seeking. </td></tr>
321
747
<hr><h2>Function Documentation</h2>
322
<a name="a4" doxytag="stream_encoder.h::FLAC__stream_encoder_new"></a><p>
323
<table width="100%" cellpadding="2" cellspacing="0" border="0">
326
<table cellpadding="0" cellspacing="0" border="0">
328
<td class="md" nowrap valign="top"> <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>* FLAC__stream_encoder_new </td>
329
<td class="md" valign="top">( </td>
330
<td class="mdname1" valign="top" nowrap> </td>
331
<td class="md" valign="top">) </td>
332
<td class="md" nowrap></td>
339
<table cellspacing=5 cellpadding=0 border=0>
347
Create a new stream encoder instance. The instance is created with default settings; see the individual FLAC__stream_encoder_set_*() functions for each setting's default.<dl compact><dt><b>
348
Return values: </b><dd>
349
<table border=0 cellspacing=2 cellpadding=0>
350
<tr><td valign=top><em><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a></em> </td><td>
351
* <code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
356
<a name="a5" doxytag="stream_encoder.h::FLAC__stream_encoder_delete"></a><p>
357
<table width="100%" cellpadding="2" cellspacing="0" border="0">
360
<table cellpadding="0" cellspacing="0" border="0">
362
<td class="md" nowrap valign="top"> void FLAC__stream_encoder_delete </td>
363
<td class="md" valign="top">( </td>
364
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
365
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
366
<td class="md" valign="top">) </td>
367
<td class="md" nowrap></td>
374
<table cellspacing=5 cellpadding=0 border=0>
382
Free an encoder instance. Deletes the object pointed to by <em>encoder</em>.<dl compact><dt><b>
384
<table border=0 cellspacing=2 cellpadding=0>
385
<tr><td valign=top><em>encoder</em> </td><td>
386
A pointer to an existing encoder. </td></tr>
388
</dl><dl compact><dt><b>
390
<div class="fragment"><pre>encoder != NULL
391
</pre></div> </dl> </td>
394
<a name="a6" doxytag="stream_encoder.h::FLAC__stream_encoder_set_verify"></a><p>
395
<table width="100%" cellpadding="2" cellspacing="0" border="0">
398
<table cellpadding="0" cellspacing="0" border="0">
400
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_verify </td>
401
<td class="md" valign="top">( </td>
402
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
403
<td class="mdname" nowrap> <em>encoder</em>, </td>
408
<td class="md" nowrap>FLAC__bool </td>
409
<td class="mdname" nowrap> <em>value</em></td>
413
<td class="md">) </td>
414
<td class="md" colspan="2"></td>
421
<table cellspacing=5 cellpadding=0 border=0>
429
Set the "verify" flag. If <code>true</code>, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return <code>false</code>. Note that this will slow the encoding process by the extra time required for decoding and comparison.<dl compact><dt><b>
430
Default Value:</b><dd>
431
<code>false</code> </dl><dl compact><dt><b>
433
<table border=0 cellspacing=2 cellpadding=0>
434
<tr><td valign=top><em>encoder</em> </td><td>
435
An encoder instance to set. </td></tr>
436
<tr><td valign=top><em>value</em> </td><td>
437
Flag value (see above). </td></tr>
439
</dl><dl compact><dt><b>
441
<div class="fragment"><pre>encoder != NULL
442
</pre></div> </dl><dl compact><dt><b>
443
Return values: </b><dd>
444
<table border=0 cellspacing=2 cellpadding=0>
445
<tr><td valign=top><em>FLAC__bool</em> </td><td>
446
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
451
<a name="a7" doxytag="stream_encoder.h::FLAC__stream_encoder_set_streamable_subset"></a><p>
452
<table width="100%" cellpadding="2" cellspacing="0" border="0">
455
<table cellpadding="0" cellspacing="0" border="0">
457
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_streamable_subset </td>
458
<td class="md" valign="top">( </td>
459
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
460
<td class="mdname" nowrap> <em>encoder</em>, </td>
465
<td class="md" nowrap>FLAC__bool </td>
466
<td class="mdname" nowrap> <em>value</em></td>
470
<td class="md">) </td>
471
<td class="md" colspan="2"></td>
478
<table cellspacing=5 cellpadding=0 border=0>
486
Set the "streamable subset" flag. If <code>true</code>, the encoder will comply with the subset (see the format specification) and will check the settings during <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() to see if all settings comply. If <code>false</code>, the settings may take advantage of the full range that the format allows.
488
Make sure you know what it entails before setting this to <code>false</code>.<dl compact><dt><b>
489
Default Value:</b><dd>
490
<code>true</code> </dl><dl compact><dt><b>
492
<table border=0 cellspacing=2 cellpadding=0>
493
<tr><td valign=top><em>encoder</em> </td><td>
494
An encoder instance to set. </td></tr>
495
<tr><td valign=top><em>value</em> </td><td>
496
Flag value (see above). </td></tr>
498
</dl><dl compact><dt><b>
500
<div class="fragment"><pre>encoder != NULL
501
</pre></div> </dl><dl compact><dt><b>
502
Return values: </b><dd>
503
<table border=0 cellspacing=2 cellpadding=0>
504
<tr><td valign=top><em>FLAC__bool</em> </td><td>
505
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
510
<a name="a8" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_mid_side_stereo"></a><p>
511
<table width="100%" cellpadding="2" cellspacing="0" border="0">
514
<table cellpadding="0" cellspacing="0" border="0">
516
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo </td>
517
<td class="md" valign="top">( </td>
518
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
519
<td class="mdname" nowrap> <em>encoder</em>, </td>
524
<td class="md" nowrap>FLAC__bool </td>
525
<td class="mdname" nowrap> <em>value</em></td>
529
<td class="md">) </td>
530
<td class="md" colspan="2"></td>
537
<table cellspacing=5 cellpadding=0 border=0>
545
Set to <code>true</code> to enable mid-side encoding on stereo input. The number of channels must be 2. Set to <code>false</code> to use only independent channel coding.<dl compact><dt><b>
546
Default Value:</b><dd>
547
<code>false</code> </dl><dl compact><dt><b>
549
<table border=0 cellspacing=2 cellpadding=0>
550
<tr><td valign=top><em>encoder</em> </td><td>
551
An encoder instance to set. </td></tr>
552
<tr><td valign=top><em>value</em> </td><td>
553
Flag value (see above). </td></tr>
555
</dl><dl compact><dt><b>
557
<div class="fragment"><pre>encoder != NULL
558
</pre></div> </dl><dl compact><dt><b>
559
Return values: </b><dd>
560
<table border=0 cellspacing=2 cellpadding=0>
561
<tr><td valign=top><em>FLAC__bool</em> </td><td>
562
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
567
<a name="a9" doxytag="stream_encoder.h::FLAC__stream_encoder_set_loose_mid_side_stereo"></a><p>
568
<table width="100%" cellpadding="2" cellspacing="0" border="0">
571
<table cellpadding="0" cellspacing="0" border="0">
573
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo </td>
574
<td class="md" valign="top">( </td>
575
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
576
<td class="mdname" nowrap> <em>encoder</em>, </td>
581
<td class="md" nowrap>FLAC__bool </td>
582
<td class="mdname" nowrap> <em>value</em></td>
586
<td class="md">) </td>
587
<td class="md" colspan="2"></td>
594
<table cellspacing=5 cellpadding=0 border=0>
602
Set to <code>true</code> to enable adaptive switching between mid-side and left-right encoding on stereo input. The number of channels must be 2. Set to <code>false</code> to use exhaustive searching. In either case, the mid/side stereo setting must be <code>true</code>.<dl compact><dt><b>
603
Default Value:</b><dd>
604
<code>false</code> </dl><dl compact><dt><b>
606
<table border=0 cellspacing=2 cellpadding=0>
607
<tr><td valign=top><em>encoder</em> </td><td>
608
An encoder instance to set. </td></tr>
609
<tr><td valign=top><em>value</em> </td><td>
610
Flag value (see above). </td></tr>
612
</dl><dl compact><dt><b>
614
<div class="fragment"><pre>encoder != NULL
615
</pre></div> </dl><dl compact><dt><b>
616
Return values: </b><dd>
617
<table border=0 cellspacing=2 cellpadding=0>
618
<tr><td valign=top><em>FLAC__bool</em> </td><td>
619
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
624
<a name="a10" doxytag="stream_encoder.h::FLAC__stream_encoder_set_channels"></a><p>
625
<table width="100%" cellpadding="2" cellspacing="0" border="0">
628
<table cellpadding="0" cellspacing="0" border="0">
630
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_channels </td>
631
<td class="md" valign="top">( </td>
632
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
633
<td class="mdname" nowrap> <em>encoder</em>, </td>
638
<td class="md" nowrap>unsigned </td>
639
<td class="mdname" nowrap> <em>value</em></td>
643
<td class="md">) </td>
644
<td class="md" colspan="2"></td>
651
<table cellspacing=5 cellpadding=0 border=0>
659
Set the number of channels to be encoded.<dl compact><dt><b>
660
Default Value:</b><dd>
661
<code>2</code> </dl><dl compact><dt><b>
663
<table border=0 cellspacing=2 cellpadding=0>
664
<tr><td valign=top><em>encoder</em> </td><td>
665
An encoder instance to set. </td></tr>
666
<tr><td valign=top><em>value</em> </td><td>
667
See above. </td></tr>
669
</dl><dl compact><dt><b>
671
<div class="fragment"><pre>encoder != NULL
672
</pre></div> </dl><dl compact><dt><b>
673
Return values: </b><dd>
674
<table border=0 cellspacing=2 cellpadding=0>
675
<tr><td valign=top><em>FLAC__bool</em> </td><td>
676
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
681
<a name="a11" doxytag="stream_encoder.h::FLAC__stream_encoder_set_bits_per_sample"></a><p>
682
<table width="100%" cellpadding="2" cellspacing="0" border="0">
685
<table cellpadding="0" cellspacing="0" border="0">
687
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_bits_per_sample </td>
688
<td class="md" valign="top">( </td>
689
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
690
<td class="mdname" nowrap> <em>encoder</em>, </td>
695
<td class="md" nowrap>unsigned </td>
696
<td class="mdname" nowrap> <em>value</em></td>
700
<td class="md">) </td>
701
<td class="md" colspan="2"></td>
708
<table cellspacing=5 cellpadding=0 border=0>
716
Set the sample resolution of the input to be encoded.
720
Do not feed the encoder data that is wider than the value you set here or you will generate an invalid stream.</dl><dl compact><dt><b>
721
Default Value:</b><dd>
722
<code>16</code> </dl><dl compact><dt><b>
724
<table border=0 cellspacing=2 cellpadding=0>
725
<tr><td valign=top><em>encoder</em> </td><td>
726
An encoder instance to set. </td></tr>
727
<tr><td valign=top><em>value</em> </td><td>
728
See above. </td></tr>
730
</dl><dl compact><dt><b>
732
<div class="fragment"><pre>encoder != NULL
733
</pre></div> </dl><dl compact><dt><b>
734
Return values: </b><dd>
735
<table border=0 cellspacing=2 cellpadding=0>
736
<tr><td valign=top><em>FLAC__bool</em> </td><td>
737
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
742
<a name="a12" doxytag="stream_encoder.h::FLAC__stream_encoder_set_sample_rate"></a><p>
743
<table width="100%" cellpadding="2" cellspacing="0" border="0">
746
<table cellpadding="0" cellspacing="0" border="0">
748
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_sample_rate </td>
749
<td class="md" valign="top">( </td>
750
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
751
<td class="mdname" nowrap> <em>encoder</em>, </td>
756
<td class="md" nowrap>unsigned </td>
757
<td class="mdname" nowrap> <em>value</em></td>
761
<td class="md">) </td>
762
<td class="md" colspan="2"></td>
769
<table cellspacing=5 cellpadding=0 border=0>
777
Set the sample rate (in Hz) of the input to be encoded.<dl compact><dt><b>
778
Default Value:</b><dd>
779
<code>44100</code> </dl><dl compact><dt><b>
781
<table border=0 cellspacing=2 cellpadding=0>
782
<tr><td valign=top><em>encoder</em> </td><td>
783
An encoder instance to set. </td></tr>
784
<tr><td valign=top><em>value</em> </td><td>
785
See above. </td></tr>
787
</dl><dl compact><dt><b>
789
<div class="fragment"><pre>encoder != NULL
790
</pre></div> </dl><dl compact><dt><b>
791
Return values: </b><dd>
792
<table border=0 cellspacing=2 cellpadding=0>
793
<tr><td valign=top><em>FLAC__bool</em> </td><td>
794
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
799
<a name="a13" doxytag="stream_encoder.h::FLAC__stream_encoder_set_blocksize"></a><p>
800
<table width="100%" cellpadding="2" cellspacing="0" border="0">
803
<table cellpadding="0" cellspacing="0" border="0">
805
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_blocksize </td>
806
<td class="md" valign="top">( </td>
807
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
808
<td class="mdname" nowrap> <em>encoder</em>, </td>
813
<td class="md" nowrap>unsigned </td>
814
<td class="mdname" nowrap> <em>value</em></td>
818
<td class="md">) </td>
819
<td class="md" colspan="2"></td>
826
<table cellspacing=5 cellpadding=0 border=0>
834
Set the blocksize to use while encoding.<dl compact><dt><b>
835
Default Value:</b><dd>
836
<code>1152</code> </dl><dl compact><dt><b>
838
<table border=0 cellspacing=2 cellpadding=0>
839
<tr><td valign=top><em>encoder</em> </td><td>
840
An encoder instance to set. </td></tr>
841
<tr><td valign=top><em>value</em> </td><td>
842
See above. </td></tr>
844
</dl><dl compact><dt><b>
846
<div class="fragment"><pre>encoder != NULL
847
</pre></div> </dl><dl compact><dt><b>
848
Return values: </b><dd>
849
<table border=0 cellspacing=2 cellpadding=0>
850
<tr><td valign=top><em>FLAC__bool</em> </td><td>
851
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
856
<a name="a14" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_lpc_order"></a><p>
857
<table width="100%" cellpadding="2" cellspacing="0" border="0">
860
<table cellpadding="0" cellspacing="0" border="0">
862
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_max_lpc_order </td>
863
<td class="md" valign="top">( </td>
864
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
865
<td class="mdname" nowrap> <em>encoder</em>, </td>
870
<td class="md" nowrap>unsigned </td>
871
<td class="mdname" nowrap> <em>value</em></td>
875
<td class="md">) </td>
876
<td class="md" colspan="2"></td>
883
<table cellspacing=5 cellpadding=0 border=0>
891
Set the maximum LPC order, or <code>0</code> to use only the fixed predictors.<dl compact><dt><b>
892
Default Value:</b><dd>
893
<code>0</code> </dl><dl compact><dt><b>
895
<table border=0 cellspacing=2 cellpadding=0>
896
<tr><td valign=top><em>encoder</em> </td><td>
897
An encoder instance to set. </td></tr>
898
<tr><td valign=top><em>value</em> </td><td>
899
See above. </td></tr>
901
</dl><dl compact><dt><b>
903
<div class="fragment"><pre>encoder != NULL
904
</pre></div> </dl><dl compact><dt><b>
905
Return values: </b><dd>
906
<table border=0 cellspacing=2 cellpadding=0>
907
<tr><td valign=top><em>FLAC__bool</em> </td><td>
908
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
913
<a name="a15" doxytag="stream_encoder.h::FLAC__stream_encoder_set_qlp_coeff_precision"></a><p>
914
<table width="100%" cellpadding="2" cellspacing="0" border="0">
917
<table cellpadding="0" cellspacing="0" border="0">
919
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision </td>
920
<td class="md" valign="top">( </td>
921
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
922
<td class="mdname" nowrap> <em>encoder</em>, </td>
927
<td class="md" nowrap>unsigned </td>
928
<td class="mdname" nowrap> <em>value</em></td>
932
<td class="md">) </td>
933
<td class="md" colspan="2"></td>
940
<table cellspacing=5 cellpadding=0 border=0>
948
Set the precision, in bits, of the quantized linear predictor coefficients, or <code>0</code> to let the encoder select it based on the blocksize.
952
In the current implementation, qlp_coeff_precision + bits_per_sample must be less than 32.</dl><dl compact><dt><b>
953
Default Value:</b><dd>
954
<code>0</code> </dl><dl compact><dt><b>
956
<table border=0 cellspacing=2 cellpadding=0>
957
<tr><td valign=top><em>encoder</em> </td><td>
958
An encoder instance to set. </td></tr>
959
<tr><td valign=top><em>value</em> </td><td>
960
See above. </td></tr>
962
</dl><dl compact><dt><b>
964
<div class="fragment"><pre>encoder != NULL
965
</pre></div> </dl><dl compact><dt><b>
966
Return values: </b><dd>
967
<table border=0 cellspacing=2 cellpadding=0>
968
<tr><td valign=top><em>FLAC__bool</em> </td><td>
969
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
974
<a name="a16" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_qlp_coeff_prec_search"></a><p>
975
<table width="100%" cellpadding="2" cellspacing="0" border="0">
978
<table cellpadding="0" cellspacing="0" border="0">
980
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search </td>
981
<td class="md" valign="top">( </td>
982
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
983
<td class="mdname" nowrap> <em>encoder</em>, </td>
988
<td class="md" nowrap>FLAC__bool </td>
989
<td class="mdname" nowrap> <em>value</em></td>
993
<td class="md">) </td>
994
<td class="md" colspan="2"></td>
1001
<table cellspacing=5 cellpadding=0 border=0>
1009
Set to <code>false</code> to use only the specified quantized linear predictor coefficient precision, or <code>true</code> to search neighboring precision values and use the best one.<dl compact><dt><b>
1010
Default Value:</b><dd>
1011
<code>false</code> </dl><dl compact><dt><b>
1012
Parameters: </b><dd>
1013
<table border=0 cellspacing=2 cellpadding=0>
1014
<tr><td valign=top><em>encoder</em> </td><td>
1015
An encoder instance to set. </td></tr>
1016
<tr><td valign=top><em>value</em> </td><td>
1017
See above. </td></tr>
1019
</dl><dl compact><dt><b>
1021
<div class="fragment"><pre>encoder != NULL
1022
</pre></div> </dl><dl compact><dt><b>
1023
Return values: </b><dd>
1024
<table border=0 cellspacing=2 cellpadding=0>
1025
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1026
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1031
<a name="a17" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_escape_coding"></a><p>
1032
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1035
<table cellpadding="0" cellspacing="0" border="0">
1037
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_do_escape_coding </td>
1038
<td class="md" valign="top">( </td>
1039
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1040
<td class="mdname" nowrap> <em>encoder</em>, </td>
1045
<td class="md" nowrap>FLAC__bool </td>
1046
<td class="mdname" nowrap> <em>value</em></td>
1050
<td class="md">) </td>
1051
<td class="md" colspan="2"></td>
1058
<table cellspacing=5 cellpadding=0 border=0>
1066
Deprecated. Setting this value has no effect.<dl compact><dt><b>
1067
Default Value:</b><dd>
1068
<code>false</code> </dl><dl compact><dt><b>
1069
Parameters: </b><dd>
1070
<table border=0 cellspacing=2 cellpadding=0>
1071
<tr><td valign=top><em>encoder</em> </td><td>
1072
An encoder instance to set. </td></tr>
1073
<tr><td valign=top><em>value</em> </td><td>
1074
See above. </td></tr>
1076
</dl><dl compact><dt><b>
1078
<div class="fragment"><pre>encoder != NULL
1079
</pre></div> </dl><dl compact><dt><b>
1080
Return values: </b><dd>
1081
<table border=0 cellspacing=2 cellpadding=0>
1082
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1083
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1088
<a name="a18" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_exhaustive_model_search"></a><p>
1089
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1092
<table cellpadding="0" cellspacing="0" border="0">
1094
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search </td>
1095
<td class="md" valign="top">( </td>
1096
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1097
<td class="mdname" nowrap> <em>encoder</em>, </td>
1102
<td class="md" nowrap>FLAC__bool </td>
1103
<td class="mdname" nowrap> <em>value</em></td>
1107
<td class="md">) </td>
1108
<td class="md" colspan="2"></td>
1115
<table cellspacing=5 cellpadding=0 border=0>
1123
Set to <code>false</code> to let the encoder estimate the best model order based on the residual signal energy, or <code>true</code> to force the encoder to evaluate all order models and select the best.<dl compact><dt><b>
1124
Default Value:</b><dd>
1125
<code>false</code> </dl><dl compact><dt><b>
1126
Parameters: </b><dd>
1127
<table border=0 cellspacing=2 cellpadding=0>
1128
<tr><td valign=top><em>encoder</em> </td><td>
1129
An encoder instance to set. </td></tr>
1130
<tr><td valign=top><em>value</em> </td><td>
1131
See above. </td></tr>
1133
</dl><dl compact><dt><b>
1135
<div class="fragment"><pre>encoder != NULL
1136
</pre></div> </dl><dl compact><dt><b>
1137
Return values: </b><dd>
1138
<table border=0 cellspacing=2 cellpadding=0>
1139
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1140
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1145
<a name="a19" doxytag="stream_encoder.h::FLAC__stream_encoder_set_min_residual_partition_order"></a><p>
1146
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1149
<table cellpadding="0" cellspacing="0" border="0">
1151
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order </td>
1152
<td class="md" valign="top">( </td>
1153
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1154
<td class="mdname" nowrap> <em>encoder</em>, </td>
1159
<td class="md" nowrap>unsigned </td>
1160
<td class="mdname" nowrap> <em>value</em></td>
1164
<td class="md">) </td>
1165
<td class="md" colspan="2"></td>
1172
<table cellspacing=5 cellpadding=0 border=0>
1180
Set the minimum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#a20">FLAC__stream_encoder_set_max_residual_partition_order</a>().
1182
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.
1184
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<dl compact><dt><b>
1185
Default Value:</b><dd>
1186
<code>0</code> </dl><dl compact><dt><b>
1187
Parameters: </b><dd>
1188
<table border=0 cellspacing=2 cellpadding=0>
1189
<tr><td valign=top><em>encoder</em> </td><td>
1190
An encoder instance to set. </td></tr>
1191
<tr><td valign=top><em>value</em> </td><td>
1192
See above. </td></tr>
1194
</dl><dl compact><dt><b>
1196
<div class="fragment"><pre>encoder != NULL
1197
</pre></div> </dl><dl compact><dt><b>
1198
Return values: </b><dd>
1199
<table border=0 cellspacing=2 cellpadding=0>
1200
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1201
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1206
<a name="a20" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_residual_partition_order"></a><p>
1207
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1210
<table cellpadding="0" cellspacing="0" border="0">
1212
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order </td>
1213
<td class="md" valign="top">( </td>
1214
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1215
<td class="mdname" nowrap> <em>encoder</em>, </td>
1220
<td class="md" nowrap>unsigned </td>
1221
<td class="mdname" nowrap> <em>value</em></td>
1225
<td class="md">) </td>
1226
<td class="md" colspan="2"></td>
1233
<table cellspacing=5 cellpadding=0 border=0>
1241
Set the maximum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#a19">FLAC__stream_encoder_set_min_residual_partition_order</a>().
1243
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.
1245
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<dl compact><dt><b>
1246
Default Value:</b><dd>
1247
<code>0</code> </dl><dl compact><dt><b>
1248
Parameters: </b><dd>
1249
<table border=0 cellspacing=2 cellpadding=0>
1250
<tr><td valign=top><em>encoder</em> </td><td>
1251
An encoder instance to set. </td></tr>
1252
<tr><td valign=top><em>value</em> </td><td>
1253
See above. </td></tr>
1255
</dl><dl compact><dt><b>
1257
<div class="fragment"><pre>encoder != NULL
1258
</pre></div> </dl><dl compact><dt><b>
1259
Return values: </b><dd>
1260
<table border=0 cellspacing=2 cellpadding=0>
1261
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1262
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1267
<a name="a21" doxytag="stream_encoder.h::FLAC__stream_encoder_set_rice_parameter_search_dist"></a><p>
1268
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1271
<table cellpadding="0" cellspacing="0" border="0">
1273
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist </td>
1274
<td class="md" valign="top">( </td>
1275
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1276
<td class="mdname" nowrap> <em>encoder</em>, </td>
1281
<td class="md" nowrap>unsigned </td>
1282
<td class="mdname" nowrap> <em>value</em></td>
1286
<td class="md">) </td>
1287
<td class="md" colspan="2"></td>
1294
<table cellspacing=5 cellpadding=0 border=0>
1302
Deprecated. Setting this value has no effect.<dl compact><dt><b>
1303
Default Value:</b><dd>
1304
<code>0</code> </dl><dl compact><dt><b>
1305
Parameters: </b><dd>
1306
<table border=0 cellspacing=2 cellpadding=0>
1307
<tr><td valign=top><em>encoder</em> </td><td>
1308
An encoder instance to set. </td></tr>
1309
<tr><td valign=top><em>value</em> </td><td>
1310
See above. </td></tr>
1312
</dl><dl compact><dt><b>
1314
<div class="fragment"><pre>encoder != NULL
1315
</pre></div> </dl><dl compact><dt><b>
1316
Return values: </b><dd>
1317
<table border=0 cellspacing=2 cellpadding=0>
1318
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1319
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1324
<a name="a22" doxytag="stream_encoder.h::FLAC__stream_encoder_set_total_samples_estimate"></a><p>
1325
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1328
<table cellpadding="0" cellspacing="0" border="0">
1330
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_total_samples_estimate </td>
1331
<td class="md" valign="top">( </td>
1332
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1333
<td class="mdname" nowrap> <em>encoder</em>, </td>
748
<a class="anchor" name="ga12" doxytag="stream_encoder.h::FLAC__stream_encoder_new"></a><p>
749
<table class="mdTable" cellpadding="2" cellspacing="0">
752
<table cellpadding="0" cellspacing="0" border="0">
754
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>* FLAC__stream_encoder_new </td>
755
<td class="md" valign="top">( </td>
756
<td class="md" nowrap valign="top">void </td>
757
<td class="mdname1" valign="top" nowrap> </td>
758
<td class="md" valign="top"> ) </td>
759
<td class="md" nowrap></td>
765
<table cellspacing="5" cellpadding="0" border="0">
773
Create a new stream encoder instance. The instance is created with default settings; see the individual FLAC__stream_encoder_set_*() functions for each setting's default.<p>
774
<dl compact><dt><b>Return values:</b></dt><dd>
775
<table border="0" cellspacing="2" cellpadding="0">
776
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoder*</em> </td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
782
<a class="anchor" name="ga13" doxytag="stream_encoder.h::FLAC__stream_encoder_delete"></a><p>
783
<table class="mdTable" cellpadding="2" cellspacing="0">
786
<table cellpadding="0" cellspacing="0" border="0">
788
<td class="md" nowrap valign="top">void FLAC__stream_encoder_delete </td>
789
<td class="md" valign="top">( </td>
790
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
791
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
792
<td class="md" valign="top"> ) </td>
793
<td class="md" nowrap></td>
799
<table cellspacing="5" cellpadding="0" border="0">
807
Free an encoder instance. Deletes the object pointed to by <em>encoder</em>.<p>
808
<dl compact><dt><b>Parameters:</b></dt><dd>
809
<table border="0" cellspacing="2" cellpadding="0">
810
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>A pointer to an existing encoder. </td></tr>
813
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
814
</pre></div> </dd></dl>
818
<a class="anchor" name="ga14" doxytag="stream_encoder.h::FLAC__stream_encoder_set_ogg_serial_number"></a><p>
819
<table class="mdTable" cellpadding="2" cellspacing="0">
822
<table cellpadding="0" cellspacing="0" border="0">
824
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_ogg_serial_number </td>
825
<td class="md" valign="top">( </td>
826
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
827
<td class="mdname" nowrap> <em>encoder</em>, </td>
830
<td class="md" nowrap align="right"></td>
832
<td class="md" nowrap>long </td>
833
<td class="mdname" nowrap> <em>serial_number</em></td>
837
<td class="md">) </td>
838
<td class="md" colspan="2"></td>
844
<table cellspacing="5" cellpadding="0" border="0">
852
Set the serial number for the FLAC stream to use in the Ogg container.<p>
853
<dl compact><dt><b>Note:</b></dt><dd>This does not need to be set for native FLAC encoding.<p>
854
It is recommended to set a serial number explicitly as the default of '0' may collide with other streams.</dd></dl>
855
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
856
<dl compact><dt><b>Parameters:</b></dt><dd>
857
<table border="0" cellspacing="2" cellpadding="0">
858
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
859
<tr><td valign="top"></td><td valign="top"><em>serial_number</em> </td><td>See above. </td></tr>
862
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
863
</pre></div> </dd></dl>
864
<dl compact><dt><b>Return values:</b></dt><dd>
865
<table border="0" cellspacing="2" cellpadding="0">
866
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
872
<a class="anchor" name="ga15" doxytag="stream_encoder.h::FLAC__stream_encoder_set_verify"></a><p>
873
<table class="mdTable" cellpadding="2" cellspacing="0">
876
<table cellpadding="0" cellspacing="0" border="0">
878
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_verify </td>
879
<td class="md" valign="top">( </td>
880
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
881
<td class="mdname" nowrap> <em>encoder</em>, </td>
884
<td class="md" nowrap align="right"></td>
886
<td class="md" nowrap>FLAC__bool </td>
887
<td class="mdname" nowrap> <em>value</em></td>
891
<td class="md">) </td>
892
<td class="md" colspan="2"></td>
898
<table cellspacing="5" cellpadding="0" border="0">
906
Set the "verify" flag. If <code>true</code>, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return <code>false</code>. Note that this will slow the encoding process by the extra time required for decoding and comparison.<p>
907
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
908
<dl compact><dt><b>Parameters:</b></dt><dd>
909
<table border="0" cellspacing="2" cellpadding="0">
910
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
911
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Flag value (see above). </td></tr>
914
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
915
</pre></div> </dd></dl>
916
<dl compact><dt><b>Return values:</b></dt><dd>
917
<table border="0" cellspacing="2" cellpadding="0">
918
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
924
<a class="anchor" name="ga16" doxytag="stream_encoder.h::FLAC__stream_encoder_set_streamable_subset"></a><p>
925
<table class="mdTable" cellpadding="2" cellspacing="0">
928
<table cellpadding="0" cellspacing="0" border="0">
930
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_streamable_subset </td>
931
<td class="md" valign="top">( </td>
932
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
933
<td class="mdname" nowrap> <em>encoder</em>, </td>
936
<td class="md" nowrap align="right"></td>
938
<td class="md" nowrap>FLAC__bool </td>
939
<td class="mdname" nowrap> <em>value</em></td>
943
<td class="md">) </td>
944
<td class="md" colspan="2"></td>
950
<table cellspacing="5" cellpadding="0" border="0">
958
Set the <a href="../format.html#subset">Subset</a> flag. If <code>true</code>, the encoder will comply with the Subset and will check the settings during FLAC__stream_encoder_init_*() to see if all settings comply. If <code>false</code>, the settings may take advantage of the full range that the format allows.<p>
959
Make sure you know what it entails before setting this to <code>false</code>.<p>
960
<dl compact><dt><b>Default Value:</b></dt><dd><code>true</code> </dd></dl>
961
<dl compact><dt><b>Parameters:</b></dt><dd>
962
<table border="0" cellspacing="2" cellpadding="0">
963
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
964
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Flag value (see above). </td></tr>
967
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
968
</pre></div> </dd></dl>
969
<dl compact><dt><b>Return values:</b></dt><dd>
970
<table border="0" cellspacing="2" cellpadding="0">
971
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
977
<a class="anchor" name="ga17" doxytag="stream_encoder.h::FLAC__stream_encoder_set_channels"></a><p>
978
<table class="mdTable" cellpadding="2" cellspacing="0">
981
<table cellpadding="0" cellspacing="0" border="0">
983
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_channels </td>
984
<td class="md" valign="top">( </td>
985
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
986
<td class="mdname" nowrap> <em>encoder</em>, </td>
989
<td class="md" nowrap align="right"></td>
991
<td class="md" nowrap>unsigned </td>
992
<td class="mdname" nowrap> <em>value</em></td>
996
<td class="md">) </td>
997
<td class="md" colspan="2"></td>
1003
<table cellspacing="5" cellpadding="0" border="0">
1011
Set the number of channels to be encoded.<p>
1012
<dl compact><dt><b>Default Value:</b></dt><dd><code>2</code> </dd></dl>
1013
<dl compact><dt><b>Parameters:</b></dt><dd>
1014
<table border="0" cellspacing="2" cellpadding="0">
1015
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1016
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1019
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1020
</pre></div> </dd></dl>
1021
<dl compact><dt><b>Return values:</b></dt><dd>
1022
<table border="0" cellspacing="2" cellpadding="0">
1023
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1029
<a class="anchor" name="ga18" doxytag="stream_encoder.h::FLAC__stream_encoder_set_bits_per_sample"></a><p>
1030
<table class="mdTable" cellpadding="2" cellspacing="0">
1033
<table cellpadding="0" cellspacing="0" border="0">
1035
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_bits_per_sample </td>
1036
<td class="md" valign="top">( </td>
1037
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1038
<td class="mdname" nowrap> <em>encoder</em>, </td>
1041
<td class="md" nowrap align="right"></td>
1042
<td class="md"></td>
1043
<td class="md" nowrap>unsigned </td>
1044
<td class="mdname" nowrap> <em>value</em></td>
1047
<td class="md"></td>
1048
<td class="md">) </td>
1049
<td class="md" colspan="2"></td>
1055
<table cellspacing="5" cellpadding="0" border="0">
1063
Set the sample resolution of the input to be encoded.<p>
1064
<dl compact><dt><b>Warning:</b></dt><dd>Do not feed the encoder data that is wider than the value you set here or you will generate an invalid stream.</dd></dl>
1065
<dl compact><dt><b>Default Value:</b></dt><dd><code>16</code> </dd></dl>
1066
<dl compact><dt><b>Parameters:</b></dt><dd>
1067
<table border="0" cellspacing="2" cellpadding="0">
1068
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1069
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1072
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1073
</pre></div> </dd></dl>
1074
<dl compact><dt><b>Return values:</b></dt><dd>
1075
<table border="0" cellspacing="2" cellpadding="0">
1076
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1082
<a class="anchor" name="ga19" doxytag="stream_encoder.h::FLAC__stream_encoder_set_sample_rate"></a><p>
1083
<table class="mdTable" cellpadding="2" cellspacing="0">
1086
<table cellpadding="0" cellspacing="0" border="0">
1088
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_sample_rate </td>
1089
<td class="md" valign="top">( </td>
1090
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1091
<td class="mdname" nowrap> <em>encoder</em>, </td>
1094
<td class="md" nowrap align="right"></td>
1095
<td class="md"></td>
1096
<td class="md" nowrap>unsigned </td>
1097
<td class="mdname" nowrap> <em>value</em></td>
1100
<td class="md"></td>
1101
<td class="md">) </td>
1102
<td class="md" colspan="2"></td>
1108
<table cellspacing="5" cellpadding="0" border="0">
1116
Set the sample rate (in Hz) of the input to be encoded.<p>
1117
<dl compact><dt><b>Default Value:</b></dt><dd><code>44100</code> </dd></dl>
1118
<dl compact><dt><b>Parameters:</b></dt><dd>
1119
<table border="0" cellspacing="2" cellpadding="0">
1120
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1121
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1124
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1125
</pre></div> </dd></dl>
1126
<dl compact><dt><b>Return values:</b></dt><dd>
1127
<table border="0" cellspacing="2" cellpadding="0">
1128
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1134
<a class="anchor" name="ga20" doxytag="stream_encoder.h::FLAC__stream_encoder_set_compression_level"></a><p>
1135
<table class="mdTable" cellpadding="2" cellspacing="0">
1138
<table cellpadding="0" cellspacing="0" border="0">
1140
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_compression_level </td>
1141
<td class="md" valign="top">( </td>
1142
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1143
<td class="mdname" nowrap> <em>encoder</em>, </td>
1146
<td class="md" nowrap align="right"></td>
1147
<td class="md"></td>
1148
<td class="md" nowrap>unsigned </td>
1149
<td class="mdname" nowrap> <em>value</em></td>
1152
<td class="md"></td>
1153
<td class="md">) </td>
1154
<td class="md" colspan="2"></td>
1160
<table cellspacing="5" cellpadding="0" border="0">
1168
Set the compression level<p>
1169
The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.<p>
1170
Currently the levels range from <code>0</code> (fastest, least compression) to <code>8</code> (slowest, most compression). A value larger than <code>8</code> will be treated as <code>8</code>.<p>
1171
This function automatically calls the following other <code>_set_</code> functions with appropriate values, so the client does not need to unless it specifically wants to override them:<ul>
1172
<li><a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga24">FLAC__stream_encoder_set_apodization()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist()</a></li></ul>
1174
The actual values set for each level are: <table border="1" cellspacing="3" cellpadding="3">
1176
<td><b>level</b></td><td></td><td>do mid-side stereo</td><td></td><td>loose mid-side stereo</td><td></td><td>apodization</td><td></td><td>max lpc order</td><td></td><td>qlp coeff precision</td><td></td><td>qlp coeff prec search</td><td></td><td>escape coding</td><td></td><td>exhaustive model search</td><td></td><td>min residual partition order</td><td></td><td>max residual partition order</td><td></td><td>rice parameter search dist</td><td></td></tr>
1178
<td><b>0</b></td><td></td><td>false</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
1180
<td><b>1</b></td><td></td><td>true</td><td></td><td>true</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
1182
<td><b>2</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
1184
<td><b>3</b></td><td></td><td>false</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>6</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>4</td><td></td><td>0</td><td></td></tr>
1186
<td><b>4</b></td><td></td><td>true</td><td></td><td>true</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>4</td><td></td><td>0</td><td></td></tr>
1188
<td><b>5</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>5</td><td></td><td>0</td><td></td></tr>
1190
<td><b>6</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
1192
<td><b>7</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>true</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
1194
<td><b>8</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>12</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>true</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
1197
<dl compact><dt><b>Default Value:</b></dt><dd><code>5</code> </dd></dl>
1198
<dl compact><dt><b>Parameters:</b></dt><dd>
1199
<table border="0" cellspacing="2" cellpadding="0">
1200
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1201
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1204
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1205
</pre></div> </dd></dl>
1206
<dl compact><dt><b>Return values:</b></dt><dd>
1207
<table border="0" cellspacing="2" cellpadding="0">
1208
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1214
<a class="anchor" name="ga21" doxytag="stream_encoder.h::FLAC__stream_encoder_set_blocksize"></a><p>
1215
<table class="mdTable" cellpadding="2" cellspacing="0">
1218
<table cellpadding="0" cellspacing="0" border="0">
1220
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_blocksize </td>
1221
<td class="md" valign="top">( </td>
1222
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1223
<td class="mdname" nowrap> <em>encoder</em>, </td>
1226
<td class="md" nowrap align="right"></td>
1227
<td class="md"></td>
1228
<td class="md" nowrap>unsigned </td>
1229
<td class="mdname" nowrap> <em>value</em></td>
1232
<td class="md"></td>
1233
<td class="md">) </td>
1234
<td class="md" colspan="2"></td>
1240
<table cellspacing="5" cellpadding="0" border="0">
1248
Set the blocksize to use while encoding.<p>
1249
The number of samples to use per frame. Use <code>0</code> to let the encoder estimate a blocksize; this is usually best.<p>
1250
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1251
<dl compact><dt><b>Parameters:</b></dt><dd>
1252
<table border="0" cellspacing="2" cellpadding="0">
1253
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1254
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1257
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1258
</pre></div> </dd></dl>
1259
<dl compact><dt><b>Return values:</b></dt><dd>
1260
<table border="0" cellspacing="2" cellpadding="0">
1261
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1267
<a class="anchor" name="ga22" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_mid_side_stereo"></a><p>
1268
<table class="mdTable" cellpadding="2" cellspacing="0">
1271
<table cellpadding="0" cellspacing="0" border="0">
1273
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo </td>
1274
<td class="md" valign="top">( </td>
1275
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1276
<td class="mdname" nowrap> <em>encoder</em>, </td>
1279
<td class="md" nowrap align="right"></td>
1280
<td class="md"></td>
1281
<td class="md" nowrap>FLAC__bool </td>
1282
<td class="mdname" nowrap> <em>value</em></td>
1285
<td class="md"></td>
1286
<td class="md">) </td>
1287
<td class="md" colspan="2"></td>
1293
<table cellspacing="5" cellpadding="0" border="0">
1301
Set to <code>true</code> to enable mid-side encoding on stereo input. The number of channels must be 2 for this to have any effect. Set to <code>false</code> to use only independent channel coding.<p>
1302
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1303
<dl compact><dt><b>Parameters:</b></dt><dd>
1304
<table border="0" cellspacing="2" cellpadding="0">
1305
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1306
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Flag value (see above). </td></tr>
1309
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1310
</pre></div> </dd></dl>
1311
<dl compact><dt><b>Return values:</b></dt><dd>
1312
<table border="0" cellspacing="2" cellpadding="0">
1313
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1319
<a class="anchor" name="ga23" doxytag="stream_encoder.h::FLAC__stream_encoder_set_loose_mid_side_stereo"></a><p>
1320
<table class="mdTable" cellpadding="2" cellspacing="0">
1323
<table cellpadding="0" cellspacing="0" border="0">
1325
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo </td>
1326
<td class="md" valign="top">( </td>
1327
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1328
<td class="mdname" nowrap> <em>encoder</em>, </td>
1331
<td class="md" nowrap align="right"></td>
1332
<td class="md"></td>
1333
<td class="md" nowrap>FLAC__bool </td>
1334
<td class="mdname" nowrap> <em>value</em></td>
1337
<td class="md"></td>
1338
<td class="md">) </td>
1339
<td class="md" colspan="2"></td>
1345
<table cellspacing="5" cellpadding="0" border="0">
1353
Set to <code>true</code> to enable adaptive switching between mid-side and left-right encoding on stereo input. Set to <code>false</code> to use exhaustive searching. Setting this to <code>true</code> requires <a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo()</a> to also be set to <code>true</code> in order to have any effect.<p>
1354
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1355
<dl compact><dt><b>Parameters:</b></dt><dd>
1356
<table border="0" cellspacing="2" cellpadding="0">
1357
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1358
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Flag value (see above). </td></tr>
1361
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1362
</pre></div> </dd></dl>
1363
<dl compact><dt><b>Return values:</b></dt><dd>
1364
<table border="0" cellspacing="2" cellpadding="0">
1365
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1371
<a class="anchor" name="ga24" doxytag="stream_encoder.h::FLAC__stream_encoder_set_apodization"></a><p>
1372
<table class="mdTable" cellpadding="2" cellspacing="0">
1375
<table cellpadding="0" cellspacing="0" border="0">
1377
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_apodization </td>
1378
<td class="md" valign="top">( </td>
1379
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1380
<td class="mdname" nowrap> <em>encoder</em>, </td>
1383
<td class="md" nowrap align="right"></td>
1384
<td class="md"></td>
1385
<td class="md" nowrap>const char * </td>
1386
<td class="mdname" nowrap> <em>specification</em></td>
1389
<td class="md"></td>
1390
<td class="md">) </td>
1391
<td class="md" colspan="2"></td>
1397
<table cellspacing="5" cellpadding="0" border="0">
1405
Sets the apodization function(s) the encoder will use when windowing audio data for LPC analysis.<p>
1406
The <em>specification</em> is a plain ASCII string which specifies exactly which functions to use. There may be more than one (up to 32), separated by <code>'</code>;' characters. Some functions take one or more comma-separated arguments in parentheses.<p>
1407
The available functions are <code>bartlett</code>, <code>bartlett_hann</code>, <code>blackman</code>, <code>blackman_harris_4term_92db</code>, <code>connes</code>, <code>flattop</code>, <code>gauss(STDDEV)</code>, <code>hamming</code>, <code>hann</code>, <code>kaiser_bessel</code>, <code>nuttall</code>, <code>rectangle</code>, <code>triangle</code>, <code>tukey(P)</code>, <code>welch</code>.<p>
1408
For <code>gauss(STDDEV)</code>, STDDEV specifies the standard deviation (0<STDDEV<=0.5).<p>
1409
For <code>tukey(P)</code>, P specifies the fraction of the window that is tapered (0<=P<=1). P=0 corresponds to <code>rectangle</code> and P=1 corresponds to <code>hann</code>.<p>
1410
Example specifications are <code>"blackman"</code> or <code>"hann;triangle;tukey(0.5);tukey(0.25);tukey(0.125)"</code> <p>
1411
Any function that is specified erroneously is silently dropped. Up to 32 functions are kept, the rest are dropped. If the specification is empty the encoder defaults to <code>"tukey(0.5)"</code>.<p>
1412
When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe.<p>
1413
Note that each function specified causes the encoder to occupy a floating point array in which to store the window.<p>
1414
<dl compact><dt><b>Default Value:</b></dt><dd><code>"tukey(0.5)"</code> </dd></dl>
1415
<dl compact><dt><b>Parameters:</b></dt><dd>
1416
<table border="0" cellspacing="2" cellpadding="0">
1417
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1418
<tr><td valign="top"></td><td valign="top"><em>specification</em> </td><td>See above. </td></tr>
1421
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1422
</pre></div> <div class="fragment"><pre class="fragment"> specification != NULL
1423
</pre></div> </dd></dl>
1424
<dl compact><dt><b>Return values:</b></dt><dd>
1425
<table border="0" cellspacing="2" cellpadding="0">
1426
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1432
<a class="anchor" name="ga25" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_lpc_order"></a><p>
1433
<table class="mdTable" cellpadding="2" cellspacing="0">
1436
<table cellpadding="0" cellspacing="0" border="0">
1438
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_max_lpc_order </td>
1439
<td class="md" valign="top">( </td>
1440
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1441
<td class="mdname" nowrap> <em>encoder</em>, </td>
1444
<td class="md" nowrap align="right"></td>
1445
<td class="md"></td>
1446
<td class="md" nowrap>unsigned </td>
1447
<td class="mdname" nowrap> <em>value</em></td>
1450
<td class="md"></td>
1451
<td class="md">) </td>
1452
<td class="md" colspan="2"></td>
1458
<table cellspacing="5" cellpadding="0" border="0">
1466
Set the maximum LPC order, or <code>0</code> to use only the fixed predictors.<p>
1467
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1468
<dl compact><dt><b>Parameters:</b></dt><dd>
1469
<table border="0" cellspacing="2" cellpadding="0">
1470
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1471
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1474
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1475
</pre></div> </dd></dl>
1476
<dl compact><dt><b>Return values:</b></dt><dd>
1477
<table border="0" cellspacing="2" cellpadding="0">
1478
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1484
<a class="anchor" name="ga26" doxytag="stream_encoder.h::FLAC__stream_encoder_set_qlp_coeff_precision"></a><p>
1485
<table class="mdTable" cellpadding="2" cellspacing="0">
1488
<table cellpadding="0" cellspacing="0" border="0">
1490
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision </td>
1491
<td class="md" valign="top">( </td>
1492
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1493
<td class="mdname" nowrap> <em>encoder</em>, </td>
1496
<td class="md" nowrap align="right"></td>
1497
<td class="md"></td>
1498
<td class="md" nowrap>unsigned </td>
1499
<td class="mdname" nowrap> <em>value</em></td>
1502
<td class="md"></td>
1503
<td class="md">) </td>
1504
<td class="md" colspan="2"></td>
1510
<table cellspacing="5" cellpadding="0" border="0">
1518
Set the precision, in bits, of the quantized linear predictor coefficients, or <code>0</code> to let the encoder select it based on the blocksize.<p>
1519
<dl compact><dt><b>Note:</b></dt><dd>In the current implementation, qlp_coeff_precision + bits_per_sample must be less than 32.</dd></dl>
1520
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1521
<dl compact><dt><b>Parameters:</b></dt><dd>
1522
<table border="0" cellspacing="2" cellpadding="0">
1523
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1524
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1527
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1528
</pre></div> </dd></dl>
1529
<dl compact><dt><b>Return values:</b></dt><dd>
1530
<table border="0" cellspacing="2" cellpadding="0">
1531
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1537
<a class="anchor" name="ga27" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_qlp_coeff_prec_search"></a><p>
1538
<table class="mdTable" cellpadding="2" cellspacing="0">
1541
<table cellpadding="0" cellspacing="0" border="0">
1543
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search </td>
1544
<td class="md" valign="top">( </td>
1545
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1546
<td class="mdname" nowrap> <em>encoder</em>, </td>
1549
<td class="md" nowrap align="right"></td>
1550
<td class="md"></td>
1551
<td class="md" nowrap>FLAC__bool </td>
1552
<td class="mdname" nowrap> <em>value</em></td>
1555
<td class="md"></td>
1556
<td class="md">) </td>
1557
<td class="md" colspan="2"></td>
1563
<table cellspacing="5" cellpadding="0" border="0">
1571
Set to <code>false</code> to use only the specified quantized linear predictor coefficient precision, or <code>true</code> to search neighboring precision values and use the best one.<p>
1572
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1573
<dl compact><dt><b>Parameters:</b></dt><dd>
1574
<table border="0" cellspacing="2" cellpadding="0">
1575
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1576
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1579
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1580
</pre></div> </dd></dl>
1581
<dl compact><dt><b>Return values:</b></dt><dd>
1582
<table border="0" cellspacing="2" cellpadding="0">
1583
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1589
<a class="anchor" name="ga28" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_escape_coding"></a><p>
1590
<table class="mdTable" cellpadding="2" cellspacing="0">
1593
<table cellpadding="0" cellspacing="0" border="0">
1595
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_escape_coding </td>
1596
<td class="md" valign="top">( </td>
1597
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1598
<td class="mdname" nowrap> <em>encoder</em>, </td>
1601
<td class="md" nowrap align="right"></td>
1602
<td class="md"></td>
1603
<td class="md" nowrap>FLAC__bool </td>
1604
<td class="mdname" nowrap> <em>value</em></td>
1607
<td class="md"></td>
1608
<td class="md">) </td>
1609
<td class="md" colspan="2"></td>
1615
<table cellspacing="5" cellpadding="0" border="0">
1623
Deprecated. Setting this value has no effect.<p>
1624
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1625
<dl compact><dt><b>Parameters:</b></dt><dd>
1626
<table border="0" cellspacing="2" cellpadding="0">
1627
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1628
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1631
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1632
</pre></div> </dd></dl>
1633
<dl compact><dt><b>Return values:</b></dt><dd>
1634
<table border="0" cellspacing="2" cellpadding="0">
1635
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1641
<a class="anchor" name="ga29" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_exhaustive_model_search"></a><p>
1642
<table class="mdTable" cellpadding="2" cellspacing="0">
1645
<table cellpadding="0" cellspacing="0" border="0">
1647
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search </td>
1648
<td class="md" valign="top">( </td>
1649
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1650
<td class="mdname" nowrap> <em>encoder</em>, </td>
1653
<td class="md" nowrap align="right"></td>
1654
<td class="md"></td>
1655
<td class="md" nowrap>FLAC__bool </td>
1656
<td class="mdname" nowrap> <em>value</em></td>
1659
<td class="md"></td>
1660
<td class="md">) </td>
1661
<td class="md" colspan="2"></td>
1667
<table cellspacing="5" cellpadding="0" border="0">
1675
Set to <code>false</code> to let the encoder estimate the best model order based on the residual signal energy, or <code>true</code> to force the encoder to evaluate all order models and select the best.<p>
1676
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1677
<dl compact><dt><b>Parameters:</b></dt><dd>
1678
<table border="0" cellspacing="2" cellpadding="0">
1679
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1680
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1683
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1684
</pre></div> </dd></dl>
1685
<dl compact><dt><b>Return values:</b></dt><dd>
1686
<table border="0" cellspacing="2" cellpadding="0">
1687
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1693
<a class="anchor" name="ga30" doxytag="stream_encoder.h::FLAC__stream_encoder_set_min_residual_partition_order"></a><p>
1694
<table class="mdTable" cellpadding="2" cellspacing="0">
1697
<table cellpadding="0" cellspacing="0" border="0">
1699
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order </td>
1700
<td class="md" valign="top">( </td>
1701
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1702
<td class="mdname" nowrap> <em>encoder</em>, </td>
1705
<td class="md" nowrap align="right"></td>
1706
<td class="md"></td>
1707
<td class="md" nowrap>unsigned </td>
1708
<td class="mdname" nowrap> <em>value</em></td>
1711
<td class="md"></td>
1712
<td class="md">) </td>
1713
<td class="md" colspan="2"></td>
1719
<table cellspacing="5" cellpadding="0" border="0">
1727
Set the minimum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a>.<p>
1728
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.<p>
1729
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<p>
1730
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1731
<dl compact><dt><b>Parameters:</b></dt><dd>
1732
<table border="0" cellspacing="2" cellpadding="0">
1733
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1734
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1737
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1738
</pre></div> </dd></dl>
1739
<dl compact><dt><b>Return values:</b></dt><dd>
1740
<table border="0" cellspacing="2" cellpadding="0">
1741
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1747
<a class="anchor" name="ga31" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_residual_partition_order"></a><p>
1748
<table class="mdTable" cellpadding="2" cellspacing="0">
1751
<table cellpadding="0" cellspacing="0" border="0">
1753
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order </td>
1754
<td class="md" valign="top">( </td>
1755
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1756
<td class="mdname" nowrap> <em>encoder</em>, </td>
1759
<td class="md" nowrap align="right"></td>
1760
<td class="md"></td>
1761
<td class="md" nowrap>unsigned </td>
1762
<td class="mdname" nowrap> <em>value</em></td>
1765
<td class="md"></td>
1766
<td class="md">) </td>
1767
<td class="md" colspan="2"></td>
1773
<table cellspacing="5" cellpadding="0" border="0">
1781
Set the maximum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a>.<p>
1782
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.<p>
1783
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<p>
1784
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1785
<dl compact><dt><b>Parameters:</b></dt><dd>
1786
<table border="0" cellspacing="2" cellpadding="0">
1787
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1788
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1791
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1792
</pre></div> </dd></dl>
1793
<dl compact><dt><b>Return values:</b></dt><dd>
1794
<table border="0" cellspacing="2" cellpadding="0">
1795
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1801
<a class="anchor" name="ga32" doxytag="stream_encoder.h::FLAC__stream_encoder_set_rice_parameter_search_dist"></a><p>
1802
<table class="mdTable" cellpadding="2" cellspacing="0">
1805
<table cellpadding="0" cellspacing="0" border="0">
1807
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist </td>
1808
<td class="md" valign="top">( </td>
1809
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1810
<td class="mdname" nowrap> <em>encoder</em>, </td>
1813
<td class="md" nowrap align="right"></td>
1814
<td class="md"></td>
1815
<td class="md" nowrap>unsigned </td>
1816
<td class="mdname" nowrap> <em>value</em></td>
1819
<td class="md"></td>
1820
<td class="md">) </td>
1821
<td class="md" colspan="2"></td>
1827
<table cellspacing="5" cellpadding="0" border="0">
1835
Deprecated. Setting this value has no effect.<p>
1836
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1837
<dl compact><dt><b>Parameters:</b></dt><dd>
1838
<table border="0" cellspacing="2" cellpadding="0">
1839
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1840
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1843
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1844
</pre></div> </dd></dl>
1845
<dl compact><dt><b>Return values:</b></dt><dd>
1846
<table border="0" cellspacing="2" cellpadding="0">
1847
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1853
<a class="anchor" name="ga33" doxytag="stream_encoder.h::FLAC__stream_encoder_set_total_samples_estimate"></a><p>
1854
<table class="mdTable" cellpadding="2" cellspacing="0">
1857
<table cellpadding="0" cellspacing="0" border="0">
1859
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_total_samples_estimate </td>
1860
<td class="md" valign="top">( </td>
1861
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1862
<td class="mdname" nowrap> <em>encoder</em>, </td>
1865
<td class="md" nowrap align="right"></td>
1866
<td class="md"></td>
1338
1867
<td class="md" nowrap>FLAC__uint64 </td>
1339
<td class="mdname" nowrap> <em>value</em></td>
1868
<td class="mdname" nowrap> <em>value</em></td>
1871
<td class="md"></td>
1343
1872
<td class="md">) </td>
1344
1873
<td class="md" colspan="2"></td>
1351
<table cellspacing=5 cellpadding=0 border=0>
1879
<table cellspacing="5" cellpadding="0" border="0">
1359
Set an estimate of the total samples that will be encoded. This is merely an estimate and may be set to <code>0</code> if unknown. This value will be written to the STREAMINFO block before encoding, and can remove the need for the caller to rewrite the value later if the value is known before encoding.<dl compact><dt><b>
1360
Default Value:</b><dd>
1361
<code>0</code> </dl><dl compact><dt><b>
1362
Parameters: </b><dd>
1363
<table border=0 cellspacing=2 cellpadding=0>
1364
<tr><td valign=top><em>encoder</em> </td><td>
1365
An encoder instance to set. </td></tr>
1366
<tr><td valign=top><em>value</em> </td><td>
1367
See above. </td></tr>
1369
</dl><dl compact><dt><b>
1371
<div class="fragment"><pre>encoder != NULL
1372
</pre></div> </dl><dl compact><dt><b>
1373
Return values: </b><dd>
1374
<table border=0 cellspacing=2 cellpadding=0>
1375
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1376
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1887
Set an estimate of the total samples that will be encoded. This is merely an estimate and may be set to <code>0</code> if unknown. This value will be written to the STREAMINFO block before encoding, and can remove the need for the caller to rewrite the value later if the value is known before encoding.<p>
1888
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
1889
<dl compact><dt><b>Parameters:</b></dt><dd>
1890
<table border="0" cellspacing="2" cellpadding="0">
1891
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1892
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>See above. </td></tr>
1895
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1896
</pre></div> </dd></dl>
1897
<dl compact><dt><b>Return values:</b></dt><dd>
1898
<table border="0" cellspacing="2" cellpadding="0">
1899
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1381
<a name="a23" doxytag="stream_encoder.h::FLAC__stream_encoder_set_metadata"></a><p>
1382
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1905
<a class="anchor" name="ga34" doxytag="stream_encoder.h::FLAC__stream_encoder_set_metadata"></a><p>
1906
<table class="mdTable" cellpadding="2" cellspacing="0">
1385
1909
<table cellpadding="0" cellspacing="0" border="0">
1387
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_metadata </td>
1911
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_metadata </td>
1388
1912
<td class="md" valign="top">( </td>
1389
1913
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1390
<td class="mdname" nowrap> <em>encoder</em>, </td>
1914
<td class="mdname" nowrap> <em>encoder</em>, </td>
1917
<td class="md" nowrap align="right"></td>
1918
<td class="md"></td>
1395
1919
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> ** </td>
1396
<td class="mdname" nowrap> <em>metadata</em>, </td>
1920
<td class="mdname" nowrap> <em>metadata</em>, </td>
1923
<td class="md" nowrap align="right"></td>
1924
<td class="md"></td>
1401
1925
<td class="md" nowrap>unsigned </td>
1402
<td class="mdname" nowrap> <em>num_blocks</em></td>
1406
<td class="md">) </td>
1407
<td class="md" colspan="2"></td>
1414
<table cellspacing=5 cellpadding=0 border=0>
1422
Set the metadata blocks to be emitted to the stream before encoding. A value of <code>NULL</code>, <code>0</code> implies no metadata; otherwise, supply an array of pointers to metadata blocks. The array is non-const since the encoder may need to change the <em>is_last</em> flag inside them. Otherwise, the encoder will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding.
1426
The encoder stores only the <em>metadata</em> pointer; the passed-in array must survive at least until after <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() returns. Do not modify the array or free the blocks until then.</dl><dl compact><dt><b>
1428
The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array.</dl><dl compact><dt><b>
1430
By default the encoder does not create a SEEKTABLE. If one is supplied in the <em>metadata</em> array it will be written verbatim. However by itself this is not very useful as the user will not know the stream offsets for the seekpoints ahead of time. You must use the seekable stream encoder to generate a legal seektable (see <a class="el" href="group__flac__seekable__stream__encoder.html#a25">FLAC__seekable_stream_encoder_set_metadata</a>())</dl><dl compact><dt><b>
1432
A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the <em>metadata</em> array, libFLAC will write an empty one, containing only the vendor string.</dl><dl compact><dt><b>
1433
Default Value:</b><dd>
1434
<code>NULL</code>, 0 </dl><dl compact><dt><b>
1435
Parameters: </b><dd>
1436
<table border=0 cellspacing=2 cellpadding=0>
1437
<tr><td valign=top><em>encoder</em> </td><td>
1438
An encoder instance to set. </td></tr>
1439
<tr><td valign=top><em>metadata</em> </td><td>
1440
See above. </td></tr>
1441
<tr><td valign=top><em>num_blocks</em> </td><td>
1442
See above. </td></tr>
1444
</dl><dl compact><dt><b>
1446
<div class="fragment"><pre>encoder != NULL
1447
</pre></div> </dl><dl compact><dt><b>
1448
Return values: </b><dd>
1449
<table border=0 cellspacing=2 cellpadding=0>
1450
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1451
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1456
<a name="a24" doxytag="stream_encoder.h::FLAC__stream_encoder_set_write_callback"></a><p>
1457
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1460
<table cellpadding="0" cellspacing="0" border="0">
1462
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_write_callback </td>
1463
<td class="md" valign="top">( </td>
1464
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1465
<td class="mdname" nowrap> <em>encoder</em>, </td>
1470
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#a2">FLAC__StreamEncoderWriteCallback</a> </td>
1471
<td class="mdname" nowrap> <em>value</em></td>
1475
<td class="md">) </td>
1476
<td class="md" colspan="2"></td>
1483
<table cellspacing=5 cellpadding=0 border=0>
1491
Set the write callback. The supplied function will be called by the encoder anytime there is raw encoded data ready to write. It may include metadata mixed with encoded audio frames and the data is not guaranteed to be aligned on frame or metadata block boundaries.
1493
The only duty of the callback is to write out the <em>bytes</em> worth of data in <em>buffer</em> to the current position in the output stream. The arguments <em>samples</em> and <em>current_frame</em> are purely informational. If <em>samples</em> is greater than <code>0</code>, then <em>current_frame</em> will hold the current frame number that is being written; otherwise, the write callback is being called to write metadata.
1497
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
1498
Default Value:</b><dd>
1499
<code>NULL</code> </dl><dl compact><dt><b>
1500
Parameters: </b><dd>
1501
<table border=0 cellspacing=2 cellpadding=0>
1502
<tr><td valign=top><em>encoder</em> </td><td>
1503
An encoder instance to set. </td></tr>
1504
<tr><td valign=top><em>value</em> </td><td>
1505
See above. </td></tr>
1507
</dl><dl compact><dt><b>
1509
<div class="fragment"><pre>encoder != NULL
1510
</pre></div> <div class="fragment"><pre>value != NULL
1511
</pre></div> </dl><dl compact><dt><b>
1512
Return values: </b><dd>
1513
<table border=0 cellspacing=2 cellpadding=0>
1514
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1515
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1520
<a name="a25" doxytag="stream_encoder.h::FLAC__stream_encoder_set_metadata_callback"></a><p>
1521
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1524
<table cellpadding="0" cellspacing="0" border="0">
1526
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_metadata_callback </td>
1527
<td class="md" valign="top">( </td>
1528
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1529
<td class="mdname" nowrap> <em>encoder</em>, </td>
1534
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#a3">FLAC__StreamEncoderMetadataCallback</a> </td>
1535
<td class="mdname" nowrap> <em>value</em></td>
1539
<td class="md">) </td>
1540
<td class="md" colspan="2"></td>
1547
<table cellspacing=5 cellpadding=0 border=0>
1555
Set the metadata callback. The supplied function will be called once at the end of encoding with the populated STREAMINFO structure. This is so file encoders can seek back to the beginning of the file and write the STREAMINFO block with the correct statistics after encoding (like minimum/maximum frame size and total samples).
1559
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
1560
Default Value:</b><dd>
1561
<code>NULL</code> </dl><dl compact><dt><b>
1562
Parameters: </b><dd>
1563
<table border=0 cellspacing=2 cellpadding=0>
1564
<tr><td valign=top><em>encoder</em> </td><td>
1565
An encoder instance to set. </td></tr>
1566
<tr><td valign=top><em>value</em> </td><td>
1567
See above. </td></tr>
1569
</dl><dl compact><dt><b>
1571
<div class="fragment"><pre>encoder != NULL
1572
</pre></div> <div class="fragment"><pre>value != NULL
1573
</pre></div> </dl><dl compact><dt><b>
1574
Return values: </b><dd>
1575
<table border=0 cellspacing=2 cellpadding=0>
1576
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1577
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1582
<a name="a26" doxytag="stream_encoder.h::FLAC__stream_encoder_set_client_data"></a><p>
1583
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1586
<table cellpadding="0" cellspacing="0" border="0">
1588
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_client_data </td>
1589
<td class="md" valign="top">( </td>
1590
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1591
<td class="mdname" nowrap> <em>encoder</em>, </td>
1596
<td class="md" nowrap>void * </td>
1597
<td class="mdname" nowrap> <em>value</em></td>
1601
<td class="md">) </td>
1602
<td class="md" colspan="2"></td>
1609
<table cellspacing=5 cellpadding=0 border=0>
1617
Set the client data to be passed back to callbacks. This value will be supplied to callbacks in their <em>client_data</em> argument.<dl compact><dt><b>
1618
Default Value:</b><dd>
1619
<code>NULL</code> </dl><dl compact><dt><b>
1620
Parameters: </b><dd>
1621
<table border=0 cellspacing=2 cellpadding=0>
1622
<tr><td valign=top><em>encoder</em> </td><td>
1623
An encoder instance to set. </td></tr>
1624
<tr><td valign=top><em>value</em> </td><td>
1625
See above. </td></tr>
1627
</dl><dl compact><dt><b>
1629
<div class="fragment"><pre>encoder != NULL
1630
</pre></div> </dl><dl compact><dt><b>
1631
Return values: </b><dd>
1632
<table border=0 cellspacing=2 cellpadding=0>
1633
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1634
<code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
1639
<a name="a27" doxytag="stream_encoder.h::FLAC__stream_encoder_get_state"></a><p>
1640
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1643
<table cellpadding="0" cellspacing="0" border="0">
1645
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__stream__encoder.html#a52">FLAC__StreamEncoderState</a> FLAC__stream_encoder_get_state </td>
1646
<td class="md" valign="top">( </td>
1647
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1648
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1649
<td class="md" valign="top">) </td>
1650
<td class="md" nowrap></td>
1657
<table cellspacing=5 cellpadding=0 border=0>
1665
Get the current encoder state.<dl compact><dt><b>
1666
Parameters: </b><dd>
1667
<table border=0 cellspacing=2 cellpadding=0>
1668
<tr><td valign=top><em>encoder</em> </td><td>
1669
An encoder instance to query. </td></tr>
1671
</dl><dl compact><dt><b>
1673
<div class="fragment"><pre>encoder != NULL
1674
</pre></div> </dl><dl compact><dt><b>
1675
Return values: </b><dd>
1676
<table border=0 cellspacing=2 cellpadding=0>
1677
<tr><td valign=top><em>FLAC__StreamEncoderState</em> </td><td>
1678
The current encoder state. </td></tr>
1683
<a name="a28" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_state"></a><p>
1684
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1687
<table cellpadding="0" cellspacing="0" border="0">
1689
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> FLAC__stream_encoder_get_verify_decoder_state </td>
1690
<td class="md" valign="top">( </td>
1691
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1692
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1693
<td class="md" valign="top">) </td>
1694
<td class="md" nowrap></td>
1701
<table cellspacing=5 cellpadding=0 border=0>
1709
Get the state of the verify stream decoder. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>.<dl compact><dt><b>
1710
Parameters: </b><dd>
1711
<table border=0 cellspacing=2 cellpadding=0>
1712
<tr><td valign=top><em>encoder</em> </td><td>
1713
An encoder instance to query. </td></tr>
1715
</dl><dl compact><dt><b>
1717
<div class="fragment"><pre>encoder != NULL
1718
</pre></div> </dl><dl compact><dt><b>
1719
Return values: </b><dd>
1720
<table border=0 cellspacing=2 cellpadding=0>
1721
<tr><td valign=top><em>FLAC__StreamDecoderState</em> </td><td>
1722
The verify stream decoder state. </td></tr>
1727
<a name="a29" doxytag="stream_encoder.h::FLAC__stream_encoder_get_resolved_state_string"></a><p>
1728
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1731
<table cellpadding="0" cellspacing="0" border="0">
1733
<td class="md" nowrap valign="top"> const char* FLAC__stream_encoder_get_resolved_state_string </td>
1734
<td class="md" valign="top">( </td>
1735
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1736
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1737
<td class="md" valign="top">) </td>
1738
<td class="md" nowrap></td>
1745
<table cellspacing=5 cellpadding=0 border=0>
1753
Get the current encoder state as a C string. This version automatically resolves <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code> by getting the verify decoder's state.<dl compact><dt><b>
1754
Parameters: </b><dd>
1755
<table border=0 cellspacing=2 cellpadding=0>
1756
<tr><td valign=top><em>encoder</em> </td><td>
1757
A encoder instance to query. </td></tr>
1759
</dl><dl compact><dt><b>
1761
<div class="fragment"><pre>encoder != NULL
1762
</pre></div> </dl><dl compact><dt><b>
1763
Return values: </b><dd>
1764
<table border=0 cellspacing=2 cellpadding=0>
1765
<tr><td valign=top><em>const</em> </td><td>
1766
char * The encoder state as a C string. Do not modify the contents. </td></tr>
1771
<a name="a30" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_error_stats"></a><p>
1772
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1775
<table cellpadding="0" cellspacing="0" border="0">
1777
<td class="md" nowrap valign="top"> void FLAC__stream_encoder_get_verify_decoder_error_stats </td>
1778
<td class="md" valign="top">( </td>
1779
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1780
<td class="mdname" nowrap> <em>encoder</em>, </td>
1926
<td class="mdname" nowrap> <em>num_blocks</em></td>
1929
<td class="md"></td>
1930
<td class="md">) </td>
1931
<td class="md" colspan="2"></td>
1937
<table cellspacing="5" cellpadding="0" border="0">
1945
Set the metadata blocks to be emitted to the stream before encoding. A value of <code>NULL</code>, <code>0</code> implies no metadata; otherwise, supply an array of pointers to metadata blocks. The array is non-const since the encoder may need to change the <em>is_last</em> flag inside them, and in some cases update seek point offsets. Otherwise, the encoder will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding finishes.<p>
1946
<dl compact><dt><b>Note:</b></dt><dd>The encoder stores only copies of the pointers in the <em>metadata</em> array; the metadata blocks themselves must survive at least until after <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> returns. Do not free the blocks until then.<p>
1947
The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array.<p>
1948
By default the encoder does not create a SEEKTABLE. If one is supplied in the <em>metadata</em> array, but the client has specified that it does not support seeking, then the SEEKTABLE will be written verbatim. However by itself this is not very useful as the client will not know the stream offsets for the seekpoints ahead of time. In order to get a proper seektable the client must support seeking. See next note.<p>
1949
SEEKTABLE blocks are handled specially. Since you will not know the values for the seek point stream offsets, you should pass in a SEEKTABLE 'template', that is, a SEEKTABLE object with the required sample numbers (or placeholder points), with <code>0</code> for the <em>frame_samples</em> and <em>stream_offset</em> fields for each point. If the client has specified that it supports seeking by providing a seek callback to <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> or both seek AND read callback to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> (or by using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), then while it is encoding the encoder will fill the stream offsets in for you and when encoding is finished, it will seek back and write the real values into the SEEKTABLE block in the stream. There are helper routines for manipulating seektable template blocks; see metadata.h: FLAC__metadata_object_seektable_template_*(). If the client does not support seeking, the SEEKTABLE will have inaccurate offsets which will slow down or remove the ability to seek in the FLAC stream.<p>
1950
The encoder instance <b>will</b> modify the first <code>SEEKTABLE</code> block as it transforms the template to a valid seektable while encoding, but it is still up to the caller to free all metadata blocks after encoding.<p>
1951
A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the <em>metadata</em> array, libFLAC will write an empty one, containing only the vendor string.<p>
1952
The Ogg FLAC mapping requires that the VORBIS_COMMENT block be the second metadata block of the stream. The encoder already supplies the STREAMINFO block automatically. If <em>metadata</em> does not contain a VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if <em>metadata</em> does contain a VORBIS_COMMENT block and it is not the first, the init function will reorder <em>metadata</em> by moving the VORBIS_COMMENT block to the front; the relative ordering of the other blocks will remain as they were.<p>
1953
The Ogg FLAC mapping limits the number of metadata blocks per stream to <code>65535</code>. If <em>num_blocks</em> exceeds this the function will return <code>false</code>.</dd></dl>
1954
<dl compact><dt><b>Default Value:</b></dt><dd><code>NULL</code>, 0 </dd></dl>
1955
<dl compact><dt><b>Parameters:</b></dt><dd>
1956
<table border="0" cellspacing="2" cellpadding="0">
1957
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
1958
<tr><td valign="top"></td><td valign="top"><em>metadata</em> </td><td>See above. </td></tr>
1959
<tr><td valign="top"></td><td valign="top"><em>num_blocks</em> </td><td>See above. </td></tr>
1962
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
1963
</pre></div> </dd></dl>
1964
<dl compact><dt><b>Return values:</b></dt><dd>
1965
<table border="0" cellspacing="2" cellpadding="0">
1966
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. <code>false</code> if the encoder is already initialized, or if <em>num_blocks</em> > 65535 if encoding to Ogg FLAC, else <code>true</code>. </td></tr>
1972
<a class="anchor" name="ga35" doxytag="stream_encoder.h::FLAC__stream_encoder_get_state"></a><p>
1973
<table class="mdTable" cellpadding="2" cellspacing="0">
1976
<table cellpadding="0" cellspacing="0" border="0">
1978
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> FLAC__stream_encoder_get_state </td>
1979
<td class="md" valign="top">( </td>
1980
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1981
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1982
<td class="md" valign="top"> ) </td>
1983
<td class="md" nowrap></td>
1989
<table cellspacing="5" cellpadding="0" border="0">
1997
Get the current encoder state.<p>
1998
<dl compact><dt><b>Parameters:</b></dt><dd>
1999
<table border="0" cellspacing="2" cellpadding="0">
2000
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2003
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2004
</pre></div> </dd></dl>
2005
<dl compact><dt><b>Return values:</b></dt><dd>
2006
<table border="0" cellspacing="2" cellpadding="0">
2007
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderState</em> </td><td>The current encoder state. </td></tr>
2013
<a class="anchor" name="ga36" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_state"></a><p>
2014
<table class="mdTable" cellpadding="2" cellspacing="0">
2017
<table cellpadding="0" cellspacing="0" border="0">
2019
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> FLAC__stream_encoder_get_verify_decoder_state </td>
2020
<td class="md" valign="top">( </td>
2021
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2022
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2023
<td class="md" valign="top"> ) </td>
2024
<td class="md" nowrap></td>
2030
<table cellspacing="5" cellpadding="0" border="0">
2038
Get the state of the verify stream decoder. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>.<p>
2039
<dl compact><dt><b>Parameters:</b></dt><dd>
2040
<table border="0" cellspacing="2" cellpadding="0">
2041
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2044
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2045
</pre></div> </dd></dl>
2046
<dl compact><dt><b>Return values:</b></dt><dd>
2047
<table border="0" cellspacing="2" cellpadding="0">
2048
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderState</em> </td><td>The verify stream decoder state. </td></tr>
2054
<a class="anchor" name="ga37" doxytag="stream_encoder.h::FLAC__stream_encoder_get_resolved_state_string"></a><p>
2055
<table class="mdTable" cellpadding="2" cellspacing="0">
2058
<table cellpadding="0" cellspacing="0" border="0">
2060
<td class="md" nowrap valign="top">const char* FLAC__stream_encoder_get_resolved_state_string </td>
2061
<td class="md" valign="top">( </td>
2062
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2063
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2064
<td class="md" valign="top"> ) </td>
2065
<td class="md" nowrap></td>
2071
<table cellspacing="5" cellpadding="0" border="0">
2079
Get the current encoder state as a C string. This version automatically resolves <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code> by getting the verify decoder's state.<p>
2080
<dl compact><dt><b>Parameters:</b></dt><dd>
2081
<table border="0" cellspacing="2" cellpadding="0">
2082
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>A encoder instance to query. </td></tr>
2085
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2086
</pre></div> </dd></dl>
2087
<dl compact><dt><b>Return values:</b></dt><dd>
2088
<table border="0" cellspacing="2" cellpadding="0">
2089
<tr><td valign="top"></td><td valign="top"><em>const</em> </td><td>char * The encoder state as a C string. Do not modify the contents. </td></tr>
2095
<a class="anchor" name="ga38" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_error_stats"></a><p>
2096
<table class="mdTable" cellpadding="2" cellspacing="0">
2099
<table cellpadding="0" cellspacing="0" border="0">
2101
<td class="md" nowrap valign="top">void FLAC__stream_encoder_get_verify_decoder_error_stats </td>
2102
<td class="md" valign="top">( </td>
2103
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2104
<td class="mdname" nowrap> <em>encoder</em>, </td>
2107
<td class="md" nowrap align="right"></td>
2108
<td class="md"></td>
1785
2109
<td class="md" nowrap>FLAC__uint64 * </td>
1786
<td class="mdname" nowrap> <em>absolute_sample</em>, </td>
1791
<td class="md" nowrap>unsigned * </td>
1792
<td class="mdname" nowrap> <em>frame_number</em>, </td>
1797
<td class="md" nowrap>unsigned * </td>
1798
<td class="mdname" nowrap> <em>channel</em>, </td>
1803
<td class="md" nowrap>unsigned * </td>
1804
<td class="mdname" nowrap> <em>sample</em>, </td>
1809
<td class="md" nowrap>FLAC__int32 * </td>
1810
<td class="mdname" nowrap> <em>expected</em>, </td>
1815
<td class="md" nowrap>FLAC__int32 * </td>
1816
<td class="mdname" nowrap> <em>got</em></td>
1820
<td class="md">) </td>
1821
<td class="md" colspan="2"></td>
1828
<table cellspacing=5 cellpadding=0 border=0>
1836
Get relevant values about the nature of a verify decoder error. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>. The arguments should be addresses in which the stats will be returned, or NULL if value is not desired.<dl compact><dt><b>
1837
Parameters: </b><dd>
1838
<table border=0 cellspacing=2 cellpadding=0>
1839
<tr><td valign=top><em>encoder</em> </td><td>
1840
An encoder instance to query. </td></tr>
1841
<tr><td valign=top><em>absolute_sample</em> </td><td>
1842
The absolute sample number of the mismatch. </td></tr>
1843
<tr><td valign=top><em>frame_number</em> </td><td>
1844
The number of the frame in which the mismatch occurred. </td></tr>
1845
<tr><td valign=top><em>channel</em> </td><td>
1846
The channel in which the mismatch occurred. </td></tr>
1847
<tr><td valign=top><em>sample</em> </td><td>
1848
The number of the sample (relative to the frame) in which the mismatch occurred. </td></tr>
1849
<tr><td valign=top><em>expected</em> </td><td>
1850
The expected value for the sample in question. </td></tr>
1851
<tr><td valign=top><em>got</em> </td><td>
1852
The actual value returned by the decoder. </td></tr>
1854
</dl><dl compact><dt><b>
1856
<div class="fragment"><pre>encoder != NULL
1857
</pre></div> </dl> </td>
1860
<a name="a31" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify"></a><p>
1861
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1864
<table cellpadding="0" cellspacing="0" border="0">
1866
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_verify </td>
1867
<td class="md" valign="top">( </td>
1868
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1869
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1870
<td class="md" valign="top">) </td>
1871
<td class="md" nowrap></td>
1878
<table cellspacing=5 cellpadding=0 border=0>
1886
Get the "verify" flag.<dl compact><dt><b>
1887
Parameters: </b><dd>
1888
<table border=0 cellspacing=2 cellpadding=0>
1889
<tr><td valign=top><em>encoder</em> </td><td>
1890
An encoder instance to query. </td></tr>
1892
</dl><dl compact><dt><b>
1894
<div class="fragment"><pre>encoder != NULL
1895
</pre></div> </dl><dl compact><dt><b>
1896
Return values: </b><dd>
1897
<table border=0 cellspacing=2 cellpadding=0>
1898
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1899
See <a class="el" href="group__flac__stream__encoder.html#a6">FLAC__stream_encoder_set_verify</a>(). </td></tr>
1904
<a name="a32" doxytag="stream_encoder.h::FLAC__stream_encoder_get_streamable_subset"></a><p>
1905
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1908
<table cellpadding="0" cellspacing="0" border="0">
1910
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_streamable_subset </td>
1911
<td class="md" valign="top">( </td>
1912
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1913
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1914
<td class="md" valign="top">) </td>
1915
<td class="md" nowrap></td>
1922
<table cellspacing=5 cellpadding=0 border=0>
1930
Get the "streamable subset" flag.<dl compact><dt><b>
1931
Parameters: </b><dd>
1932
<table border=0 cellspacing=2 cellpadding=0>
1933
<tr><td valign=top><em>encoder</em> </td><td>
1934
An encoder instance to query. </td></tr>
1936
</dl><dl compact><dt><b>
1938
<div class="fragment"><pre>encoder != NULL
1939
</pre></div> </dl><dl compact><dt><b>
1940
Return values: </b><dd>
1941
<table border=0 cellspacing=2 cellpadding=0>
1942
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1943
See <a class="el" href="group__flac__stream__encoder.html#a7">FLAC__stream_encoder_set_streamable_subset</a>(). </td></tr>
1948
<a name="a33" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_mid_side_stereo"></a><p>
1949
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1952
<table cellpadding="0" cellspacing="0" border="0">
1954
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo </td>
1955
<td class="md" valign="top">( </td>
1956
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
1957
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
1958
<td class="md" valign="top">) </td>
1959
<td class="md" nowrap></td>
1966
<table cellspacing=5 cellpadding=0 border=0>
1974
Get the "mid/side stereo coding" flag.<dl compact><dt><b>
1975
Parameters: </b><dd>
1976
<table border=0 cellspacing=2 cellpadding=0>
1977
<tr><td valign=top><em>encoder</em> </td><td>
1978
An encoder instance to query. </td></tr>
1980
</dl><dl compact><dt><b>
1982
<div class="fragment"><pre>encoder != NULL
1983
</pre></div> </dl><dl compact><dt><b>
1984
Return values: </b><dd>
1985
<table border=0 cellspacing=2 cellpadding=0>
1986
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1987
See <a class="el" href="group__flac__stream__encoder.html#a33">FLAC__stream_encoder_get_do_mid_side_stereo</a>(). </td></tr>
1992
<a name="a34" doxytag="stream_encoder.h::FLAC__stream_encoder_get_loose_mid_side_stereo"></a><p>
1993
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1996
<table cellpadding="0" cellspacing="0" border="0">
1998
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo </td>
1999
<td class="md" valign="top">( </td>
2000
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2001
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2002
<td class="md" valign="top">) </td>
2003
<td class="md" nowrap></td>
2010
<table cellspacing=5 cellpadding=0 border=0>
2018
Get the "adaptive mid/side switching" flag.<dl compact><dt><b>
2019
Parameters: </b><dd>
2020
<table border=0 cellspacing=2 cellpadding=0>
2021
<tr><td valign=top><em>encoder</em> </td><td>
2022
An encoder instance to query. </td></tr>
2024
</dl><dl compact><dt><b>
2026
<div class="fragment"><pre>encoder != NULL
2027
</pre></div> </dl><dl compact><dt><b>
2028
Return values: </b><dd>
2029
<table border=0 cellspacing=2 cellpadding=0>
2030
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2031
See <a class="el" href="group__flac__stream__encoder.html#a9">FLAC__stream_encoder_set_loose_mid_side_stereo</a>(). </td></tr>
2036
<a name="a35" doxytag="stream_encoder.h::FLAC__stream_encoder_get_channels"></a><p>
2037
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2040
<table cellpadding="0" cellspacing="0" border="0">
2042
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_channels </td>
2043
<td class="md" valign="top">( </td>
2044
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2045
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2046
<td class="md" valign="top">) </td>
2047
<td class="md" nowrap></td>
2054
<table cellspacing=5 cellpadding=0 border=0>
2062
Get the number of input channels being processed.<dl compact><dt><b>
2063
Parameters: </b><dd>
2064
<table border=0 cellspacing=2 cellpadding=0>
2065
<tr><td valign=top><em>encoder</em> </td><td>
2066
An encoder instance to query. </td></tr>
2068
</dl><dl compact><dt><b>
2070
<div class="fragment"><pre>encoder != NULL
2071
</pre></div> </dl><dl compact><dt><b>
2072
Return values: </b><dd>
2073
<table border=0 cellspacing=2 cellpadding=0>
2074
<tr><td valign=top><em>unsigned</em> </td><td>
2075
See <a class="el" href="group__flac__stream__encoder.html#a10">FLAC__stream_encoder_set_channels</a>(). </td></tr>
2080
<a name="a36" doxytag="stream_encoder.h::FLAC__stream_encoder_get_bits_per_sample"></a><p>
2081
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2084
<table cellpadding="0" cellspacing="0" border="0">
2086
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_bits_per_sample </td>
2087
<td class="md" valign="top">( </td>
2088
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2089
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2090
<td class="md" valign="top">) </td>
2091
<td class="md" nowrap></td>
2098
<table cellspacing=5 cellpadding=0 border=0>
2106
Get the input sample resolution setting.<dl compact><dt><b>
2107
Parameters: </b><dd>
2108
<table border=0 cellspacing=2 cellpadding=0>
2109
<tr><td valign=top><em>encoder</em> </td><td>
2110
An encoder instance to query. </td></tr>
2112
</dl><dl compact><dt><b>
2114
<div class="fragment"><pre>encoder != NULL
2115
</pre></div> </dl><dl compact><dt><b>
2116
Return values: </b><dd>
2117
<table border=0 cellspacing=2 cellpadding=0>
2118
<tr><td valign=top><em>unsigned</em> </td><td>
2119
See <a class="el" href="group__flac__stream__encoder.html#a11">FLAC__stream_encoder_set_bits_per_sample</a>(). </td></tr>
2124
<a name="a37" doxytag="stream_encoder.h::FLAC__stream_encoder_get_sample_rate"></a><p>
2125
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2128
<table cellpadding="0" cellspacing="0" border="0">
2130
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_sample_rate </td>
2131
<td class="md" valign="top">( </td>
2132
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2133
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2134
<td class="md" valign="top">) </td>
2135
<td class="md" nowrap></td>
2142
<table cellspacing=5 cellpadding=0 border=0>
2150
Get the input sample rate setting.<dl compact><dt><b>
2151
Parameters: </b><dd>
2152
<table border=0 cellspacing=2 cellpadding=0>
2153
<tr><td valign=top><em>encoder</em> </td><td>
2154
An encoder instance to query. </td></tr>
2156
</dl><dl compact><dt><b>
2158
<div class="fragment"><pre>encoder != NULL
2159
</pre></div> </dl><dl compact><dt><b>
2160
Return values: </b><dd>
2161
<table border=0 cellspacing=2 cellpadding=0>
2162
<tr><td valign=top><em>unsigned</em> </td><td>
2163
See <a class="el" href="group__flac__stream__encoder.html#a12">FLAC__stream_encoder_set_sample_rate</a>(). </td></tr>
2168
<a name="a38" doxytag="stream_encoder.h::FLAC__stream_encoder_get_blocksize"></a><p>
2169
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2172
<table cellpadding="0" cellspacing="0" border="0">
2174
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_blocksize </td>
2175
<td class="md" valign="top">( </td>
2176
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2177
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2178
<td class="md" valign="top">) </td>
2179
<td class="md" nowrap></td>
2186
<table cellspacing=5 cellpadding=0 border=0>
2194
Get the blocksize setting.<dl compact><dt><b>
2195
Parameters: </b><dd>
2196
<table border=0 cellspacing=2 cellpadding=0>
2197
<tr><td valign=top><em>encoder</em> </td><td>
2198
An encoder instance to query. </td></tr>
2200
</dl><dl compact><dt><b>
2202
<div class="fragment"><pre>encoder != NULL
2203
</pre></div> </dl><dl compact><dt><b>
2204
Return values: </b><dd>
2205
<table border=0 cellspacing=2 cellpadding=0>
2206
<tr><td valign=top><em>unsigned</em> </td><td>
2207
See <a class="el" href="group__flac__stream__encoder.html#a13">FLAC__stream_encoder_set_blocksize</a>(). </td></tr>
2212
<a name="a39" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_lpc_order"></a><p>
2213
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2216
<table cellpadding="0" cellspacing="0" border="0">
2218
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_max_lpc_order </td>
2219
<td class="md" valign="top">( </td>
2220
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2221
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2222
<td class="md" valign="top">) </td>
2223
<td class="md" nowrap></td>
2230
<table cellspacing=5 cellpadding=0 border=0>
2238
Get the maximum LPC order setting.<dl compact><dt><b>
2239
Parameters: </b><dd>
2240
<table border=0 cellspacing=2 cellpadding=0>
2241
<tr><td valign=top><em>encoder</em> </td><td>
2242
An encoder instance to query. </td></tr>
2244
</dl><dl compact><dt><b>
2246
<div class="fragment"><pre>encoder != NULL
2247
</pre></div> </dl><dl compact><dt><b>
2248
Return values: </b><dd>
2249
<table border=0 cellspacing=2 cellpadding=0>
2250
<tr><td valign=top><em>unsigned</em> </td><td>
2251
See <a class="el" href="group__flac__stream__encoder.html#a14">FLAC__stream_encoder_set_max_lpc_order</a>(). </td></tr>
2256
<a name="a40" doxytag="stream_encoder.h::FLAC__stream_encoder_get_qlp_coeff_precision"></a><p>
2257
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2260
<table cellpadding="0" cellspacing="0" border="0">
2262
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_qlp_coeff_precision </td>
2263
<td class="md" valign="top">( </td>
2264
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2265
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2266
<td class="md" valign="top">) </td>
2267
<td class="md" nowrap></td>
2274
<table cellspacing=5 cellpadding=0 border=0>
2282
Get the quantized linear predictor coefficient precision setting.<dl compact><dt><b>
2283
Parameters: </b><dd>
2284
<table border=0 cellspacing=2 cellpadding=0>
2285
<tr><td valign=top><em>encoder</em> </td><td>
2286
An encoder instance to query. </td></tr>
2288
</dl><dl compact><dt><b>
2290
<div class="fragment"><pre>encoder != NULL
2291
</pre></div> </dl><dl compact><dt><b>
2292
Return values: </b><dd>
2293
<table border=0 cellspacing=2 cellpadding=0>
2294
<tr><td valign=top><em>unsigned</em> </td><td>
2295
See <a class="el" href="group__flac__stream__encoder.html#a15">FLAC__stream_encoder_set_qlp_coeff_precision</a>(). </td></tr>
2300
<a name="a41" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_qlp_coeff_prec_search"></a><p>
2301
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2304
<table cellpadding="0" cellspacing="0" border="0">
2306
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search </td>
2307
<td class="md" valign="top">( </td>
2308
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2309
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2310
<td class="md" valign="top">) </td>
2311
<td class="md" nowrap></td>
2318
<table cellspacing=5 cellpadding=0 border=0>
2326
Get the qlp coefficient precision search flag.<dl compact><dt><b>
2327
Parameters: </b><dd>
2328
<table border=0 cellspacing=2 cellpadding=0>
2329
<tr><td valign=top><em>encoder</em> </td><td>
2330
An encoder instance to query. </td></tr>
2332
</dl><dl compact><dt><b>
2334
<div class="fragment"><pre>encoder != NULL
2335
</pre></div> </dl><dl compact><dt><b>
2336
Return values: </b><dd>
2337
<table border=0 cellspacing=2 cellpadding=0>
2338
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2339
See <a class="el" href="group__flac__stream__encoder.html#a16">FLAC__stream_encoder_set_do_qlp_coeff_prec_search</a>(). </td></tr>
2344
<a name="a42" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_escape_coding"></a><p>
2345
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2348
<table cellpadding="0" cellspacing="0" border="0">
2350
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_do_escape_coding </td>
2351
<td class="md" valign="top">( </td>
2352
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2353
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2354
<td class="md" valign="top">) </td>
2355
<td class="md" nowrap></td>
2362
<table cellspacing=5 cellpadding=0 border=0>
2370
Get the "escape coding" flag.<dl compact><dt><b>
2371
Parameters: </b><dd>
2372
<table border=0 cellspacing=2 cellpadding=0>
2373
<tr><td valign=top><em>encoder</em> </td><td>
2374
An encoder instance to query. </td></tr>
2376
</dl><dl compact><dt><b>
2378
<div class="fragment"><pre>encoder != NULL
2379
</pre></div> </dl><dl compact><dt><b>
2380
Return values: </b><dd>
2381
<table border=0 cellspacing=2 cellpadding=0>
2382
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2383
See <a class="el" href="group__flac__stream__encoder.html#a17">FLAC__stream_encoder_set_do_escape_coding</a>(). </td></tr>
2388
<a name="a43" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_exhaustive_model_search"></a><p>
2389
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2392
<table cellpadding="0" cellspacing="0" border="0">
2394
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search </td>
2395
<td class="md" valign="top">( </td>
2396
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2397
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2398
<td class="md" valign="top">) </td>
2399
<td class="md" nowrap></td>
2406
<table cellspacing=5 cellpadding=0 border=0>
2414
Get the exhaustive model search flag.<dl compact><dt><b>
2415
Parameters: </b><dd>
2416
<table border=0 cellspacing=2 cellpadding=0>
2417
<tr><td valign=top><em>encoder</em> </td><td>
2418
An encoder instance to query. </td></tr>
2420
</dl><dl compact><dt><b>
2422
<div class="fragment"><pre>encoder != NULL
2423
</pre></div> </dl><dl compact><dt><b>
2424
Return values: </b><dd>
2425
<table border=0 cellspacing=2 cellpadding=0>
2426
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2427
See <a class="el" href="group__flac__stream__encoder.html#a18">FLAC__stream_encoder_set_do_exhaustive_model_search</a>(). </td></tr>
2432
<a name="a44" doxytag="stream_encoder.h::FLAC__stream_encoder_get_min_residual_partition_order"></a><p>
2433
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2436
<table cellpadding="0" cellspacing="0" border="0">
2438
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_min_residual_partition_order </td>
2439
<td class="md" valign="top">( </td>
2440
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2441
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2442
<td class="md" valign="top">) </td>
2443
<td class="md" nowrap></td>
2450
<table cellspacing=5 cellpadding=0 border=0>
2458
Get the minimum residual partition order setting.<dl compact><dt><b>
2459
Parameters: </b><dd>
2460
<table border=0 cellspacing=2 cellpadding=0>
2461
<tr><td valign=top><em>encoder</em> </td><td>
2462
An encoder instance to query. </td></tr>
2464
</dl><dl compact><dt><b>
2466
<div class="fragment"><pre>encoder != NULL
2467
</pre></div> </dl><dl compact><dt><b>
2468
Return values: </b><dd>
2469
<table border=0 cellspacing=2 cellpadding=0>
2470
<tr><td valign=top><em>unsigned</em> </td><td>
2471
See <a class="el" href="group__flac__stream__encoder.html#a19">FLAC__stream_encoder_set_min_residual_partition_order</a>(). </td></tr>
2476
<a name="a45" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_residual_partition_order"></a><p>
2477
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2480
<table cellpadding="0" cellspacing="0" border="0">
2482
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_max_residual_partition_order </td>
2483
<td class="md" valign="top">( </td>
2484
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2485
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2486
<td class="md" valign="top">) </td>
2487
<td class="md" nowrap></td>
2494
<table cellspacing=5 cellpadding=0 border=0>
2502
Get maximum residual partition order setting.<dl compact><dt><b>
2503
Parameters: </b><dd>
2504
<table border=0 cellspacing=2 cellpadding=0>
2505
<tr><td valign=top><em>encoder</em> </td><td>
2506
An encoder instance to query. </td></tr>
2508
</dl><dl compact><dt><b>
2510
<div class="fragment"><pre>encoder != NULL
2511
</pre></div> </dl><dl compact><dt><b>
2512
Return values: </b><dd>
2513
<table border=0 cellspacing=2 cellpadding=0>
2514
<tr><td valign=top><em>unsigned</em> </td><td>
2515
See <a class="el" href="group__flac__stream__encoder.html#a20">FLAC__stream_encoder_set_max_residual_partition_order</a>(). </td></tr>
2520
<a name="a46" doxytag="stream_encoder.h::FLAC__stream_encoder_get_rice_parameter_search_dist"></a><p>
2521
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2524
<table cellpadding="0" cellspacing="0" border="0">
2526
<td class="md" nowrap valign="top"> unsigned FLAC__stream_encoder_get_rice_parameter_search_dist </td>
2527
<td class="md" valign="top">( </td>
2528
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2529
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2530
<td class="md" valign="top">) </td>
2531
<td class="md" nowrap></td>
2538
<table cellspacing=5 cellpadding=0 border=0>
2546
Get the Rice parameter search distance setting.<dl compact><dt><b>
2547
Parameters: </b><dd>
2548
<table border=0 cellspacing=2 cellpadding=0>
2549
<tr><td valign=top><em>encoder</em> </td><td>
2550
An encoder instance to query. </td></tr>
2552
</dl><dl compact><dt><b>
2554
<div class="fragment"><pre>encoder != NULL
2555
</pre></div> </dl><dl compact><dt><b>
2556
Return values: </b><dd>
2557
<table border=0 cellspacing=2 cellpadding=0>
2558
<tr><td valign=top><em>unsigned</em> </td><td>
2559
See <a class="el" href="group__flac__stream__encoder.html#a21">FLAC__stream_encoder_set_rice_parameter_search_dist</a>(). </td></tr>
2564
<a name="a47" doxytag="stream_encoder.h::FLAC__stream_encoder_get_total_samples_estimate"></a><p>
2565
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2568
<table cellpadding="0" cellspacing="0" border="0">
2570
<td class="md" nowrap valign="top"> FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate </td>
2571
<td class="md" valign="top">( </td>
2572
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2573
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2574
<td class="md" valign="top">) </td>
2575
<td class="md" nowrap></td>
2582
<table cellspacing=5 cellpadding=0 border=0>
2590
Get the previously set estimate of the total samples to be encoded. The encoder merely mimics back the value given to <a class="el" href="group__flac__stream__encoder.html#a22">FLAC__stream_encoder_set_total_samples_estimate</a>() since it has no other way of knowing how many samples the user will encode.<dl compact><dt><b>
2591
Parameters: </b><dd>
2592
<table border=0 cellspacing=2 cellpadding=0>
2593
<tr><td valign=top><em>encoder</em> </td><td>
2594
An encoder instance to set. </td></tr>
2596
</dl><dl compact><dt><b>
2598
<div class="fragment"><pre>encoder != NULL
2599
</pre></div> </dl><dl compact><dt><b>
2600
Return values: </b><dd>
2601
<table border=0 cellspacing=2 cellpadding=0>
2602
<tr><td valign=top><em>FLAC__uint64</em> </td><td>
2603
See <a class="el" href="group__flac__stream__encoder.html#a47">FLAC__stream_encoder_get_total_samples_estimate</a>(). </td></tr>
2608
<a name="a48" doxytag="stream_encoder.h::FLAC__stream_encoder_init"></a><p>
2609
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2612
<table cellpadding="0" cellspacing="0" border="0">
2614
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__stream__encoder.html#a52">FLAC__StreamEncoderState</a> FLAC__stream_encoder_init </td>
2615
<td class="md" valign="top">( </td>
2616
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2617
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2618
<td class="md" valign="top">) </td>
2619
<td class="md" nowrap></td>
2626
<table cellspacing=5 cellpadding=0 border=0>
2634
Initialize the encoder instance. Should be called after <a class="el" href="group__flac__stream__encoder.html#a4">FLAC__stream_encoder_new</a>() and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#a50">FLAC__stream_encoder_process</a>() or <a class="el" href="group__flac__stream__encoder.html#a51">FLAC__stream_encoder_process_interleaved</a>(). Will set and return the encoder state, which will be FLAC__STREAM_ENCODER_OK if initialization succeeded.
2636
The call to <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block.<dl compact><dt><b>
2637
Parameters: </b><dd>
2638
<table border=0 cellspacing=2 cellpadding=0>
2639
<tr><td valign=top><em>encoder</em> </td><td>
2640
An uninitialized encoder instance. </td></tr>
2642
</dl><dl compact><dt><b>
2644
<div class="fragment"><pre>encoder != NULL
2645
</pre></div> </dl><dl compact><dt><b>
2646
Return values: </b><dd>
2647
<table border=0 cellspacing=2 cellpadding=0>
2648
<tr><td valign=top><em>FLAC__StreamEncoderState</em> </td><td>
2649
<code>FLAC__STREAM_ENCODER_OK</code> if initialization was successful; see FLAC__StreamEncoderState for the meanings of other return values. </td></tr>
2654
<a name="a49" doxytag="stream_encoder.h::FLAC__stream_encoder_finish"></a><p>
2655
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2658
<table cellpadding="0" cellspacing="0" border="0">
2660
<td class="md" nowrap valign="top"> void FLAC__stream_encoder_finish </td>
2661
<td class="md" valign="top">( </td>
2662
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2663
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2664
<td class="md" valign="top">) </td>
2665
<td class="md" nowrap></td>
2672
<table cellspacing=5 cellpadding=0 border=0>
2680
Finish the encoding process. Flushes the encoding buffer, releases resources, resets the encoder settings to their defaults, and returns the encoder state to FLAC__STREAM_ENCODER_UNINITIALIZED. Note that this can generate one or more write callbacks before returning, and will generate a metadata callback.
2682
In the event of a prematurely-terminated encode, it is not strictly necessary to call this immediately before <a class="el" href="group__flac__stream__encoder.html#a5">FLAC__stream_encoder_delete</a>() but it is good practice to match every <a class="el" href="group__flac__stream__encoder.html#a48">FLAC__stream_encoder_init</a>() with a <a class="el" href="group__flac__stream__encoder.html#a49">FLAC__stream_encoder_finish</a>().<dl compact><dt><b>
2683
Parameters: </b><dd>
2684
<table border=0 cellspacing=2 cellpadding=0>
2685
<tr><td valign=top><em>encoder</em> </td><td>
2686
An uninitialized encoder instance. </td></tr>
2688
</dl><dl compact><dt><b>
2690
<div class="fragment"><pre>encoder != NULL
2691
</pre></div> </dl> </td>
2694
<a name="a50" doxytag="stream_encoder.h::FLAC__stream_encoder_process"></a><p>
2695
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2698
<table cellpadding="0" cellspacing="0" border="0">
2700
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_process </td>
2701
<td class="md" valign="top">( </td>
2702
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2703
<td class="mdname" nowrap> <em>encoder</em>, </td>
2708
<td class="md" nowrap>const FLAC__int32 *const </td>
2709
<td class="mdname" nowrap> <em>buffer</em>[], </td>
2110
<td class="mdname" nowrap> <em>absolute_sample</em>, </td>
2113
<td class="md" nowrap align="right"></td>
2114
<td class="md"></td>
2115
<td class="md" nowrap>unsigned * </td>
2116
<td class="mdname" nowrap> <em>frame_number</em>, </td>
2119
<td class="md" nowrap align="right"></td>
2120
<td class="md"></td>
2121
<td class="md" nowrap>unsigned * </td>
2122
<td class="mdname" nowrap> <em>channel</em>, </td>
2125
<td class="md" nowrap align="right"></td>
2126
<td class="md"></td>
2127
<td class="md" nowrap>unsigned * </td>
2128
<td class="mdname" nowrap> <em>sample</em>, </td>
2131
<td class="md" nowrap align="right"></td>
2132
<td class="md"></td>
2133
<td class="md" nowrap>FLAC__int32 * </td>
2134
<td class="mdname" nowrap> <em>expected</em>, </td>
2137
<td class="md" nowrap align="right"></td>
2138
<td class="md"></td>
2139
<td class="md" nowrap>FLAC__int32 * </td>
2140
<td class="mdname" nowrap> <em>got</em></td>
2143
<td class="md"></td>
2144
<td class="md">) </td>
2145
<td class="md" colspan="2"></td>
2151
<table cellspacing="5" cellpadding="0" border="0">
2159
Get relevant values about the nature of a verify decoder error. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>. The arguments should be addresses in which the stats will be returned, or NULL if value is not desired.<p>
2160
<dl compact><dt><b>Parameters:</b></dt><dd>
2161
<table border="0" cellspacing="2" cellpadding="0">
2162
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2163
<tr><td valign="top"></td><td valign="top"><em>absolute_sample</em> </td><td>The absolute sample number of the mismatch. </td></tr>
2164
<tr><td valign="top"></td><td valign="top"><em>frame_number</em> </td><td>The number of the frame in which the mismatch occurred. </td></tr>
2165
<tr><td valign="top"></td><td valign="top"><em>channel</em> </td><td>The channel in which the mismatch occurred. </td></tr>
2166
<tr><td valign="top"></td><td valign="top"><em>sample</em> </td><td>The number of the sample (relative to the frame) in which the mismatch occurred. </td></tr>
2167
<tr><td valign="top"></td><td valign="top"><em>expected</em> </td><td>The expected value for the sample in question. </td></tr>
2168
<tr><td valign="top"></td><td valign="top"><em>got</em> </td><td>The actual value returned by the decoder. </td></tr>
2171
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2172
</pre></div> </dd></dl>
2176
<a class="anchor" name="ga39" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify"></a><p>
2177
<table class="mdTable" cellpadding="2" cellspacing="0">
2180
<table cellpadding="0" cellspacing="0" border="0">
2182
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_verify </td>
2183
<td class="md" valign="top">( </td>
2184
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2185
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2186
<td class="md" valign="top"> ) </td>
2187
<td class="md" nowrap></td>
2193
<table cellspacing="5" cellpadding="0" border="0">
2201
Get the "verify" flag.<p>
2202
<dl compact><dt><b>Parameters:</b></dt><dd>
2203
<table border="0" cellspacing="2" cellpadding="0">
2204
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2207
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2208
</pre></div> </dd></dl>
2209
<dl compact><dt><b>Return values:</b></dt><dd>
2210
<table border="0" cellspacing="2" cellpadding="0">
2211
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a>. </td></tr>
2217
<a class="anchor" name="ga40" doxytag="stream_encoder.h::FLAC__stream_encoder_get_streamable_subset"></a><p>
2218
<table class="mdTable" cellpadding="2" cellspacing="0">
2221
<table cellpadding="0" cellspacing="0" border="0">
2223
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_streamable_subset </td>
2224
<td class="md" valign="top">( </td>
2225
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2226
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2227
<td class="md" valign="top"> ) </td>
2228
<td class="md" nowrap></td>
2234
<table cellspacing="5" cellpadding="0" border="0">
2242
Get the <A HREF="../format.html#subset>Subset flag.<p>
2243
<dl compact><dt><b>Parameters:</b></dt><dd>
2244
<table border="0" cellspacing="2" cellpadding="0">
2245
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2248
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2249
</pre></div> </dd></dl>
2250
<dl compact><dt><b>Return values:</b></dt><dd>
2251
<table border="0" cellspacing="2" cellpadding="0">
2252
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga16">FLAC__stream_encoder_set_streamable_subset()</a>. </td></tr>
2258
<a class="anchor" name="ga41" doxytag="stream_encoder.h::FLAC__stream_encoder_get_channels"></a><p>
2259
<table class="mdTable" cellpadding="2" cellspacing="0">
2262
<table cellpadding="0" cellspacing="0" border="0">
2264
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_channels </td>
2265
<td class="md" valign="top">( </td>
2266
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2267
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2268
<td class="md" valign="top"> ) </td>
2269
<td class="md" nowrap></td>
2275
<table cellspacing="5" cellpadding="0" border="0">
2283
Get the number of input channels being processed.<p>
2284
<dl compact><dt><b>Parameters:</b></dt><dd>
2285
<table border="0" cellspacing="2" cellpadding="0">
2286
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2289
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2290
</pre></div> </dd></dl>
2291
<dl compact><dt><b>Return values:</b></dt><dd>
2292
<table border="0" cellspacing="2" cellpadding="0">
2293
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels()</a>. </td></tr>
2299
<a class="anchor" name="ga42" doxytag="stream_encoder.h::FLAC__stream_encoder_get_bits_per_sample"></a><p>
2300
<table class="mdTable" cellpadding="2" cellspacing="0">
2303
<table cellpadding="0" cellspacing="0" border="0">
2305
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_bits_per_sample </td>
2306
<td class="md" valign="top">( </td>
2307
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2308
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2309
<td class="md" valign="top"> ) </td>
2310
<td class="md" nowrap></td>
2316
<table cellspacing="5" cellpadding="0" border="0">
2324
Get the input sample resolution setting.<p>
2325
<dl compact><dt><b>Parameters:</b></dt><dd>
2326
<table border="0" cellspacing="2" cellpadding="0">
2327
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2330
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2331
</pre></div> </dd></dl>
2332
<dl compact><dt><b>Return values:</b></dt><dd>
2333
<table border="0" cellspacing="2" cellpadding="0">
2334
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. </td></tr>
2340
<a class="anchor" name="ga43" doxytag="stream_encoder.h::FLAC__stream_encoder_get_sample_rate"></a><p>
2341
<table class="mdTable" cellpadding="2" cellspacing="0">
2344
<table cellpadding="0" cellspacing="0" border="0">
2346
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_sample_rate </td>
2347
<td class="md" valign="top">( </td>
2348
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2349
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2350
<td class="md" valign="top"> ) </td>
2351
<td class="md" nowrap></td>
2357
<table cellspacing="5" cellpadding="0" border="0">
2365
Get the input sample rate setting.<p>
2366
<dl compact><dt><b>Parameters:</b></dt><dd>
2367
<table border="0" cellspacing="2" cellpadding="0">
2368
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2371
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2372
</pre></div> </dd></dl>
2373
<dl compact><dt><b>Return values:</b></dt><dd>
2374
<table border="0" cellspacing="2" cellpadding="0">
2375
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate()</a>. </td></tr>
2381
<a class="anchor" name="ga44" doxytag="stream_encoder.h::FLAC__stream_encoder_get_blocksize"></a><p>
2382
<table class="mdTable" cellpadding="2" cellspacing="0">
2385
<table cellpadding="0" cellspacing="0" border="0">
2387
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_blocksize </td>
2388
<td class="md" valign="top">( </td>
2389
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2390
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2391
<td class="md" valign="top"> ) </td>
2392
<td class="md" nowrap></td>
2398
<table cellspacing="5" cellpadding="0" border="0">
2406
Get the blocksize setting.<p>
2407
<dl compact><dt><b>Parameters:</b></dt><dd>
2408
<table border="0" cellspacing="2" cellpadding="0">
2409
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2412
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2413
</pre></div> </dd></dl>
2414
<dl compact><dt><b>Return values:</b></dt><dd>
2415
<table border="0" cellspacing="2" cellpadding="0">
2416
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga21">FLAC__stream_encoder_set_blocksize()</a>. </td></tr>
2422
<a class="anchor" name="ga45" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_mid_side_stereo"></a><p>
2423
<table class="mdTable" cellpadding="2" cellspacing="0">
2426
<table cellpadding="0" cellspacing="0" border="0">
2428
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo </td>
2429
<td class="md" valign="top">( </td>
2430
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2431
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2432
<td class="md" valign="top"> ) </td>
2433
<td class="md" nowrap></td>
2439
<table cellspacing="5" cellpadding="0" border="0">
2447
Get the "mid/side stereo coding" flag.<p>
2448
<dl compact><dt><b>Parameters:</b></dt><dd>
2449
<table border="0" cellspacing="2" cellpadding="0">
2450
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2453
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2454
</pre></div> </dd></dl>
2455
<dl compact><dt><b>Return values:</b></dt><dd>
2456
<table border="0" cellspacing="2" cellpadding="0">
2457
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga45">FLAC__stream_encoder_get_do_mid_side_stereo()</a>. </td></tr>
2463
<a class="anchor" name="ga46" doxytag="stream_encoder.h::FLAC__stream_encoder_get_loose_mid_side_stereo"></a><p>
2464
<table class="mdTable" cellpadding="2" cellspacing="0">
2467
<table cellpadding="0" cellspacing="0" border="0">
2469
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo </td>
2470
<td class="md" valign="top">( </td>
2471
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2472
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2473
<td class="md" valign="top"> ) </td>
2474
<td class="md" nowrap></td>
2480
<table cellspacing="5" cellpadding="0" border="0">
2488
Get the "adaptive mid/side switching" flag.<p>
2489
<dl compact><dt><b>Parameters:</b></dt><dd>
2490
<table border="0" cellspacing="2" cellpadding="0">
2491
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2494
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2495
</pre></div> </dd></dl>
2496
<dl compact><dt><b>Return values:</b></dt><dd>
2497
<table border="0" cellspacing="2" cellpadding="0">
2498
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo()</a>. </td></tr>
2504
<a class="anchor" name="ga47" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_lpc_order"></a><p>
2505
<table class="mdTable" cellpadding="2" cellspacing="0">
2508
<table cellpadding="0" cellspacing="0" border="0">
2510
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_max_lpc_order </td>
2511
<td class="md" valign="top">( </td>
2512
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2513
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2514
<td class="md" valign="top"> ) </td>
2515
<td class="md" nowrap></td>
2521
<table cellspacing="5" cellpadding="0" border="0">
2529
Get the maximum LPC order setting.<p>
2530
<dl compact><dt><b>Parameters:</b></dt><dd>
2531
<table border="0" cellspacing="2" cellpadding="0">
2532
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2535
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2536
</pre></div> </dd></dl>
2537
<dl compact><dt><b>Return values:</b></dt><dd>
2538
<table border="0" cellspacing="2" cellpadding="0">
2539
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order()</a>. </td></tr>
2545
<a class="anchor" name="ga48" doxytag="stream_encoder.h::FLAC__stream_encoder_get_qlp_coeff_precision"></a><p>
2546
<table class="mdTable" cellpadding="2" cellspacing="0">
2549
<table cellpadding="0" cellspacing="0" border="0">
2551
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_qlp_coeff_precision </td>
2552
<td class="md" valign="top">( </td>
2553
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2554
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2555
<td class="md" valign="top"> ) </td>
2556
<td class="md" nowrap></td>
2562
<table cellspacing="5" cellpadding="0" border="0">
2570
Get the quantized linear predictor coefficient precision setting.<p>
2571
<dl compact><dt><b>Parameters:</b></dt><dd>
2572
<table border="0" cellspacing="2" cellpadding="0">
2573
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2576
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2577
</pre></div> </dd></dl>
2578
<dl compact><dt><b>Return values:</b></dt><dd>
2579
<table border="0" cellspacing="2" cellpadding="0">
2580
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision()</a>. </td></tr>
2586
<a class="anchor" name="ga49" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_qlp_coeff_prec_search"></a><p>
2587
<table class="mdTable" cellpadding="2" cellspacing="0">
2590
<table cellpadding="0" cellspacing="0" border="0">
2592
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search </td>
2593
<td class="md" valign="top">( </td>
2594
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2595
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2596
<td class="md" valign="top"> ) </td>
2597
<td class="md" nowrap></td>
2603
<table cellspacing="5" cellpadding="0" border="0">
2611
Get the qlp coefficient precision search flag.<p>
2612
<dl compact><dt><b>Parameters:</b></dt><dd>
2613
<table border="0" cellspacing="2" cellpadding="0">
2614
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2617
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2618
</pre></div> </dd></dl>
2619
<dl compact><dt><b>Return values:</b></dt><dd>
2620
<table border="0" cellspacing="2" cellpadding="0">
2621
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search()</a>. </td></tr>
2627
<a class="anchor" name="ga50" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_escape_coding"></a><p>
2628
<table class="mdTable" cellpadding="2" cellspacing="0">
2631
<table cellpadding="0" cellspacing="0" border="0">
2633
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_escape_coding </td>
2634
<td class="md" valign="top">( </td>
2635
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2636
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2637
<td class="md" valign="top"> ) </td>
2638
<td class="md" nowrap></td>
2644
<table cellspacing="5" cellpadding="0" border="0">
2652
Get the "escape coding" flag.<p>
2653
<dl compact><dt><b>Parameters:</b></dt><dd>
2654
<table border="0" cellspacing="2" cellpadding="0">
2655
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2658
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2659
</pre></div> </dd></dl>
2660
<dl compact><dt><b>Return values:</b></dt><dd>
2661
<table border="0" cellspacing="2" cellpadding="0">
2662
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding()</a>. </td></tr>
2668
<a class="anchor" name="ga51" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_exhaustive_model_search"></a><p>
2669
<table class="mdTable" cellpadding="2" cellspacing="0">
2672
<table cellpadding="0" cellspacing="0" border="0">
2674
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search </td>
2675
<td class="md" valign="top">( </td>
2676
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2677
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2678
<td class="md" valign="top"> ) </td>
2679
<td class="md" nowrap></td>
2685
<table cellspacing="5" cellpadding="0" border="0">
2693
Get the exhaustive model search flag.<p>
2694
<dl compact><dt><b>Parameters:</b></dt><dd>
2695
<table border="0" cellspacing="2" cellpadding="0">
2696
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2699
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2700
</pre></div> </dd></dl>
2701
<dl compact><dt><b>Return values:</b></dt><dd>
2702
<table border="0" cellspacing="2" cellpadding="0">
2703
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search()</a>. </td></tr>
2709
<a class="anchor" name="ga52" doxytag="stream_encoder.h::FLAC__stream_encoder_get_min_residual_partition_order"></a><p>
2710
<table class="mdTable" cellpadding="2" cellspacing="0">
2713
<table cellpadding="0" cellspacing="0" border="0">
2715
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_min_residual_partition_order </td>
2716
<td class="md" valign="top">( </td>
2717
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2718
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2719
<td class="md" valign="top"> ) </td>
2720
<td class="md" nowrap></td>
2726
<table cellspacing="5" cellpadding="0" border="0">
2734
Get the minimum residual partition order setting.<p>
2735
<dl compact><dt><b>Parameters:</b></dt><dd>
2736
<table border="0" cellspacing="2" cellpadding="0">
2737
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2740
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2741
</pre></div> </dd></dl>
2742
<dl compact><dt><b>Return values:</b></dt><dd>
2743
<table border="0" cellspacing="2" cellpadding="0">
2744
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a>. </td></tr>
2750
<a class="anchor" name="ga53" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_residual_partition_order"></a><p>
2751
<table class="mdTable" cellpadding="2" cellspacing="0">
2754
<table cellpadding="0" cellspacing="0" border="0">
2756
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_max_residual_partition_order </td>
2757
<td class="md" valign="top">( </td>
2758
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2759
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2760
<td class="md" valign="top"> ) </td>
2761
<td class="md" nowrap></td>
2767
<table cellspacing="5" cellpadding="0" border="0">
2775
Get maximum residual partition order setting.<p>
2776
<dl compact><dt><b>Parameters:</b></dt><dd>
2777
<table border="0" cellspacing="2" cellpadding="0">
2778
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2781
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2782
</pre></div> </dd></dl>
2783
<dl compact><dt><b>Return values:</b></dt><dd>
2784
<table border="0" cellspacing="2" cellpadding="0">
2785
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a>. </td></tr>
2791
<a class="anchor" name="ga54" doxytag="stream_encoder.h::FLAC__stream_encoder_get_rice_parameter_search_dist"></a><p>
2792
<table class="mdTable" cellpadding="2" cellspacing="0">
2795
<table cellpadding="0" cellspacing="0" border="0">
2797
<td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_rice_parameter_search_dist </td>
2798
<td class="md" valign="top">( </td>
2799
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2800
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2801
<td class="md" valign="top"> ) </td>
2802
<td class="md" nowrap></td>
2808
<table cellspacing="5" cellpadding="0" border="0">
2816
Get the Rice parameter search distance setting.<p>
2817
<dl compact><dt><b>Parameters:</b></dt><dd>
2818
<table border="0" cellspacing="2" cellpadding="0">
2819
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to query. </td></tr>
2822
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2823
</pre></div> </dd></dl>
2824
<dl compact><dt><b>Return values:</b></dt><dd>
2825
<table border="0" cellspacing="2" cellpadding="0">
2826
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist()</a>. </td></tr>
2832
<a class="anchor" name="ga55" doxytag="stream_encoder.h::FLAC__stream_encoder_get_total_samples_estimate"></a><p>
2833
<table class="mdTable" cellpadding="2" cellspacing="0">
2836
<table cellpadding="0" cellspacing="0" border="0">
2838
<td class="md" nowrap valign="top">FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate </td>
2839
<td class="md" valign="top">( </td>
2840
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2841
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
2842
<td class="md" valign="top"> ) </td>
2843
<td class="md" nowrap></td>
2849
<table cellspacing="5" cellpadding="0" border="0">
2857
Get the previously set estimate of the total samples to be encoded. The encoder merely mimics back the value given to <a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a> since it has no other way of knowing how many samples the client will encode.<p>
2858
<dl compact><dt><b>Parameters:</b></dt><dd>
2859
<table border="0" cellspacing="2" cellpadding="0">
2860
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An encoder instance to set. </td></tr>
2863
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2864
</pre></div> </dd></dl>
2865
<dl compact><dt><b>Return values:</b></dt><dd>
2866
<table border="0" cellspacing="2" cellpadding="0">
2867
<tr><td valign="top"></td><td valign="top"><em>FLAC__uint64</em> </td><td>See <a class="el" href="group__flac__stream__encoder.html#ga55">FLAC__stream_encoder_get_total_samples_estimate()</a>. </td></tr>
2873
<a class="anchor" name="ga56" doxytag="stream_encoder.h::FLAC__stream_encoder_init_stream"></a><p>
2874
<table class="mdTable" cellpadding="2" cellspacing="0">
2877
<table cellpadding="0" cellspacing="0" border="0">
2879
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_stream </td>
2880
<td class="md" valign="top">( </td>
2881
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2882
<td class="mdname" nowrap> <em>encoder</em>, </td>
2885
<td class="md" nowrap align="right"></td>
2886
<td class="md"></td>
2887
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> </td>
2888
<td class="mdname" nowrap> <em>write_callback</em>, </td>
2891
<td class="md" nowrap align="right"></td>
2892
<td class="md"></td>
2893
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> </td>
2894
<td class="mdname" nowrap> <em>seek_callback</em>, </td>
2897
<td class="md" nowrap align="right"></td>
2898
<td class="md"></td>
2899
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> </td>
2900
<td class="mdname" nowrap> <em>tell_callback</em>, </td>
2903
<td class="md" nowrap align="right"></td>
2904
<td class="md"></td>
2905
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> </td>
2906
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2909
<td class="md" nowrap align="right"></td>
2910
<td class="md"></td>
2911
<td class="md" nowrap>void * </td>
2912
<td class="mdname" nowrap> <em>client_data</em></td>
2915
<td class="md"></td>
2916
<td class="md">) </td>
2917
<td class="md" colspan="2"></td>
2923
<table cellspacing="5" cellpadding="0" border="0">
2931
Initialize the encoder instance to encode native FLAC streams.<p>
2932
This flavor of initialization sets up the encoder to encode to a native FLAC stream. I/O is performed via callbacks to the client. For encoding to a plain file via filename or open <code>FILE*</code>, <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a> and <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> provide a simpler interface.<p>
2933
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
2934
The call to <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block.<p>
2935
<dl compact><dt><b>Parameters:</b></dt><dd>
2936
<table border="0" cellspacing="2" cellpadding="0">
2937
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
2938
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamEncoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
2939
<tr><td valign="top"></td><td valign="top"><em>seek_callback</em> </td><td>See FLAC__StreamEncoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. The encoder uses seeking to go back and write some some stream statistics to the STREAMINFO block; this is recommended but not necessary to create a valid FLAC stream. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
2940
<tr><td valign="top"></td><td valign="top"><em>tell_callback</em> </td><td>See FLAC__StreamEncoderTellCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is <code>NULL</code> then this argument will be ignored. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
2941
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamEncoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. If the client provides a seek callback, this function is not necessary as the encoder will automatically seek back and update the STREAMINFO block. It may also be <code>NULL</code> if the client does not support seeking, since it will have no way of going back to update the STREAMINFO. However the client can still supply a callback if it would like to know the details from the STREAMINFO. </td></tr>
2942
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2945
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
2946
</pre></div> </dd></dl>
2947
<dl compact><dt><b>Return values:</b></dt><dd>
2948
<table border="0" cellspacing="2" cellpadding="0">
2949
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
2955
<a class="anchor" name="ga57" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_stream"></a><p>
2956
<table class="mdTable" cellpadding="2" cellspacing="0">
2959
<table cellpadding="0" cellspacing="0" border="0">
2961
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_stream </td>
2962
<td class="md" valign="top">( </td>
2963
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2964
<td class="mdname" nowrap> <em>encoder</em>, </td>
2967
<td class="md" nowrap align="right"></td>
2968
<td class="md"></td>
2969
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a> </td>
2970
<td class="mdname" nowrap> <em>read_callback</em>, </td>
2973
<td class="md" nowrap align="right"></td>
2974
<td class="md"></td>
2975
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> </td>
2976
<td class="mdname" nowrap> <em>write_callback</em>, </td>
2979
<td class="md" nowrap align="right"></td>
2980
<td class="md"></td>
2981
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> </td>
2982
<td class="mdname" nowrap> <em>seek_callback</em>, </td>
2985
<td class="md" nowrap align="right"></td>
2986
<td class="md"></td>
2987
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> </td>
2988
<td class="mdname" nowrap> <em>tell_callback</em>, </td>
2991
<td class="md" nowrap align="right"></td>
2992
<td class="md"></td>
2993
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> </td>
2994
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2997
<td class="md" nowrap align="right"></td>
2998
<td class="md"></td>
2999
<td class="md" nowrap>void * </td>
3000
<td class="mdname" nowrap> <em>client_data</em></td>
3003
<td class="md"></td>
3004
<td class="md">) </td>
3005
<td class="md" colspan="2"></td>
3011
<table cellspacing="5" cellpadding="0" border="0">
3019
Initialize the encoder instance to encode Ogg FLAC streams.<p>
3020
This flavor of initialization sets up the encoder to encode to a FLAC stream in an Ogg container. I/O is performed via callbacks to the client. For encoding to a plain file via filename or open <code>FILE*</code>, <a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file()</a> and <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a> provide a simpler interface.<p>
3021
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
3022
The call to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> currently will also immediately call the write callback several times to write the metadata packets.<p>
3023
<dl compact><dt><b>Parameters:</b></dt><dd>
3024
<table border="0" cellspacing="2" cellpadding="0">
3025
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3026
<tr><td valign="top"></td><td valign="top"><em>read_callback</em> </td><td>See FLAC__StreamEncoderReadCallback. This pointer must not be <code>NULL</code> if <em>seek_callback</em> is non-NULL since they are both needed to be able to write data back to the Ogg FLAC stream in the post-encode phase. </td></tr>
3027
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamEncoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
3028
<tr><td valign="top"></td><td valign="top"><em>seek_callback</em> </td><td>See FLAC__StreamEncoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. The encoder uses seeking to go back and write some some stream statistics to the STREAMINFO block; this is recommended but not necessary to create a valid FLAC stream. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
3029
<tr><td valign="top"></td><td valign="top"><em>tell_callback</em> </td><td>See FLAC__StreamEncoderTellCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is <code>NULL</code> then this argument will be ignored. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
3030
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamEncoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. If the client provides a seek callback, this function is not necessary as the encoder will automatically seek back and update the STREAMINFO block. It may also be <code>NULL</code> if the client does not support seeking, since it will have no way of going back to update the STREAMINFO. However the client can still supply a callback if it would like to know the details from the STREAMINFO. </td></tr>
3031
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
3034
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3035
</pre></div> </dd></dl>
3036
<dl compact><dt><b>Return values:</b></dt><dd>
3037
<table border="0" cellspacing="2" cellpadding="0">
3038
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
3044
<a class="anchor" name="ga58" doxytag="stream_encoder.h::FLAC__stream_encoder_init_FILE"></a><p>
3045
<table class="mdTable" cellpadding="2" cellspacing="0">
3048
<table cellpadding="0" cellspacing="0" border="0">
3050
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_FILE </td>
3051
<td class="md" valign="top">( </td>
3052
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3053
<td class="mdname" nowrap> <em>encoder</em>, </td>
3056
<td class="md" nowrap align="right"></td>
3057
<td class="md"></td>
3058
<td class="md" nowrap>FILE * </td>
3059
<td class="mdname" nowrap> <em>file</em>, </td>
3062
<td class="md" nowrap align="right"></td>
3063
<td class="md"></td>
3064
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> </td>
3065
<td class="mdname" nowrap> <em>progress_callback</em>, </td>
3068
<td class="md" nowrap align="right"></td>
3069
<td class="md"></td>
3070
<td class="md" nowrap>void * </td>
3071
<td class="mdname" nowrap> <em>client_data</em></td>
3074
<td class="md"></td>
3075
<td class="md">) </td>
3076
<td class="md" colspan="2"></td>
3082
<table cellspacing="5" cellpadding="0" border="0">
3090
Initialize the encoder instance to encode native FLAC files.<p>
3091
This flavor of initialization sets up the encoder to encode to a plain native FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> and provide callbacks for the I/O.<p>
3092
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
3093
<dl compact><dt><b>Parameters:</b></dt><dd>
3094
<table border="0" cellspacing="2" cellpadding="0">
3095
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3096
<tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>An open file. The file should have been opened with mode <code>"w+b"</code> and rewound. The file becomes owned by the encoder and should not be manipulated by the client while encoding. Unless <em>file</em> is <code>stdout</code>, it will be closed when <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> is called. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
3097
<tr><td valign="top"></td><td valign="top"><em>progress_callback</em> </td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
3098
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
3101
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3102
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL
3103
</pre></div> </dd></dl>
3104
<dl compact><dt><b>Return values:</b></dt><dd>
3105
<table border="0" cellspacing="2" cellpadding="0">
3106
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
3112
<a class="anchor" name="ga59" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_FILE"></a><p>
3113
<table class="mdTable" cellpadding="2" cellspacing="0">
3116
<table cellpadding="0" cellspacing="0" border="0">
3118
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_FILE </td>
3119
<td class="md" valign="top">( </td>
3120
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3121
<td class="mdname" nowrap> <em>encoder</em>, </td>
3124
<td class="md" nowrap align="right"></td>
3125
<td class="md"></td>
3126
<td class="md" nowrap>FILE * </td>
3127
<td class="mdname" nowrap> <em>file</em>, </td>
3130
<td class="md" nowrap align="right"></td>
3131
<td class="md"></td>
3132
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> </td>
3133
<td class="mdname" nowrap> <em>progress_callback</em>, </td>
3136
<td class="md" nowrap align="right"></td>
3137
<td class="md"></td>
3138
<td class="md" nowrap>void * </td>
3139
<td class="mdname" nowrap> <em>client_data</em></td>
3142
<td class="md"></td>
3143
<td class="md">) </td>
3144
<td class="md" colspan="2"></td>
3150
<table cellspacing="5" cellpadding="0" border="0">
3158
Initialize the encoder instance to encode Ogg FLAC files.<p>
3159
This flavor of initialization sets up the encoder to encode to a plain Ogg FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
3160
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
3161
<dl compact><dt><b>Parameters:</b></dt><dd>
3162
<table border="0" cellspacing="2" cellpadding="0">
3163
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3164
<tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>An open file. The file should have been opened with mode <code>"w+b"</code> and rewound. The file becomes owned by the encoder and should not be manipulated by the client while encoding. Unless <em>file</em> is <code>stdout</code>, it will be closed when <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> is called. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
3165
<tr><td valign="top"></td><td valign="top"><em>progress_callback</em> </td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
3166
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
3169
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3170
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL
3171
</pre></div> </dd></dl>
3172
<dl compact><dt><b>Return values:</b></dt><dd>
3173
<table border="0" cellspacing="2" cellpadding="0">
3174
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
3180
<a class="anchor" name="ga60" doxytag="stream_encoder.h::FLAC__stream_encoder_init_file"></a><p>
3181
<table class="mdTable" cellpadding="2" cellspacing="0">
3184
<table cellpadding="0" cellspacing="0" border="0">
3186
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_file </td>
3187
<td class="md" valign="top">( </td>
3188
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3189
<td class="mdname" nowrap> <em>encoder</em>, </td>
3192
<td class="md" nowrap align="right"></td>
3193
<td class="md"></td>
3194
<td class="md" nowrap>const char * </td>
3195
<td class="mdname" nowrap> <em>filename</em>, </td>
3198
<td class="md" nowrap align="right"></td>
3199
<td class="md"></td>
3200
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> </td>
3201
<td class="mdname" nowrap> <em>progress_callback</em>, </td>
3204
<td class="md" nowrap align="right"></td>
3205
<td class="md"></td>
3206
<td class="md" nowrap>void * </td>
3207
<td class="mdname" nowrap> <em>client_data</em></td>
3210
<td class="md"></td>
3211
<td class="md">) </td>
3212
<td class="md" colspan="2"></td>
3218
<table cellspacing="5" cellpadding="0" border="0">
3226
Initialize the encoder instance to encode native FLAC files.<p>
3227
This flavor of initialization sets up the encoder to encode to a plain FLAC file. If POSIX fopen() semantics are not sufficient (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a>, or <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> and provide callbacks for the I/O.<p>
3228
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
3229
<dl compact><dt><b>Parameters:</b></dt><dd>
3230
<table border="0" cellspacing="2" cellpadding="0">
3231
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3232
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The name of the file to encode to. The file will be opened with fopen(). Use <code>NULL</code> to encode to <code>stdout</code>. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
3233
<tr><td valign="top"></td><td valign="top"><em>progress_callback</em> </td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
3234
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
3237
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3238
</pre></div> </dd></dl>
3239
<dl compact><dt><b>Return values:</b></dt><dd>
3240
<table border="0" cellspacing="2" cellpadding="0">
3241
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
3247
<a class="anchor" name="ga61" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_file"></a><p>
3248
<table class="mdTable" cellpadding="2" cellspacing="0">
3251
<table cellpadding="0" cellspacing="0" border="0">
3253
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_file </td>
3254
<td class="md" valign="top">( </td>
3255
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3256
<td class="mdname" nowrap> <em>encoder</em>, </td>
3259
<td class="md" nowrap align="right"></td>
3260
<td class="md"></td>
3261
<td class="md" nowrap>const char * </td>
3262
<td class="mdname" nowrap> <em>filename</em>, </td>
3265
<td class="md" nowrap align="right"></td>
3266
<td class="md"></td>
3267
<td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> </td>
3268
<td class="mdname" nowrap> <em>progress_callback</em>, </td>
3271
<td class="md" nowrap align="right"></td>
3272
<td class="md"></td>
3273
<td class="md" nowrap>void * </td>
3274
<td class="mdname" nowrap> <em>client_data</em></td>
3277
<td class="md"></td>
3278
<td class="md">) </td>
3279
<td class="md" colspan="2"></td>
3285
<table cellspacing="5" cellpadding="0" border="0">
3293
Initialize the encoder instance to encode Ogg FLAC files.<p>
3294
This flavor of initialization sets up the encoder to encode to a plain Ogg FLAC file. If POSIX fopen() semantics are not sufficient (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a>, or <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
3295
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
3296
<dl compact><dt><b>Parameters:</b></dt><dd>
3297
<table border="0" cellspacing="2" cellpadding="0">
3298
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3299
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The name of the file to encode to. The file will be opened with fopen(). Use <code>NULL</code> to encode to <code>stdout</code>. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
3300
<tr><td valign="top"></td><td valign="top"><em>progress_callback</em> </td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
3301
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
3304
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3305
</pre></div> </dd></dl>
3306
<dl compact><dt><b>Return values:</b></dt><dd>
3307
<table border="0" cellspacing="2" cellpadding="0">
3308
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em> </td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
3314
<a class="anchor" name="ga62" doxytag="stream_encoder.h::FLAC__stream_encoder_finish"></a><p>
3315
<table class="mdTable" cellpadding="2" cellspacing="0">
3318
<table cellpadding="0" cellspacing="0" border="0">
3320
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_finish </td>
3321
<td class="md" valign="top">( </td>
3322
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3323
<td class="mdname1" valign="top" nowrap> <em>encoder</em> </td>
3324
<td class="md" valign="top"> ) </td>
3325
<td class="md" nowrap></td>
3331
<table cellspacing="5" cellpadding="0" border="0">
3339
Finish the encoding process. Flushes the encoding buffer, releases resources, resets the encoder settings to their defaults, and returns the encoder state to FLAC__STREAM_ENCODER_UNINITIALIZED. Note that this can generate one or more write callbacks before returning, and will generate a metadata callback.<p>
3340
Note that in the course of processing the last frame, errors can occur, so the caller should be sure to check the return value to ensure the file was encoded properly.<p>
3341
In the event of a prematurely-terminated encode, it is not strictly necessary to call this immediately before <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a> but it is good practice to match every FLAC__stream_encoder_init_*() with a <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>.<p>
3342
<dl compact><dt><b>Parameters:</b></dt><dd>
3343
<table border="0" cellspacing="2" cellpadding="0">
3344
<tr><td valign="top"></td><td valign="top"><em>encoder</em> </td><td>An uninitialized encoder instance. </td></tr>
3347
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL
3348
</pre></div> </dd></dl>
3349
<dl compact><dt><b>Return values:</b></dt><dd>
3350
<table border="0" cellspacing="2" cellpadding="0">
3351
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if an error occurred processing the last frame; or if verify mode is set (see <a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a>), there was a verify mismatch; else <code>true</code>. If <code>false</code>, caller should check the state with <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> for more information about the error. </td></tr>
3357
<a class="anchor" name="ga63" doxytag="stream_encoder.h::FLAC__stream_encoder_process"></a><p>
3358
<table class="mdTable" cellpadding="2" cellspacing="0">
3361
<table cellpadding="0" cellspacing="0" border="0">
3363
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_process </td>
3364
<td class="md" valign="top">( </td>
3365
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
3366
<td class="mdname" nowrap> <em>encoder</em>, </td>
3369
<td class="md" nowrap align="right"></td>
3370
<td class="md"></td>
3371
<td class="md" nowrap>const FLAC__int32 *const </td>
3372
<td class="mdname" nowrap> <em>buffer</em>[], </td>
3375
<td class="md" nowrap align="right"></td>
3376
<td class="md"></td>
2714
3377
<td class="md" nowrap>unsigned </td>
2715
<td class="mdname" nowrap> <em>samples</em></td>
3378
<td class="mdname" nowrap> <em>samples</em></td>
3381
<td class="md"></td>
2719
3382
<td class="md">) </td>
2720
3383
<td class="md" colspan="2"></td>
2727
<table cellspacing=5 cellpadding=0 border=0>
3389
<table cellspacing="5" cellpadding="0" border="0">