1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
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>
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>
11
[<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#a34">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__StreamDecoderWriteStatus</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>
214
<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">
219
<table cellpadding="0" cellspacing="0" border="0">
221
<td class="md" nowrap valign="top"> enum FLAC__StreamEncoderState
226
<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>
244
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>
248
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>
250
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>
252
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>
254
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>
256
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>
258
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>
266
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>
272
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#a71">FLAC__format_cuesheet_is_legal</a>()<li>It contains an illegal SEEKTABLE as checked by <a class="el" href="group__flac__format.html#a69">FLAC__format_seektable_is_legal</a>()<li>It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block </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>
313
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>
315
An unrecoverable error occurred. The encoder will return from the process call. </td></tr>
321
<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>
1338
<td class="md" nowrap>FLAC__uint64 </td>
1339
<td class="mdname" nowrap> <em>value</em></td>
1343
<td class="md">) </td>
1344
<td class="md" colspan="2"></td>
1351
<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>
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">
1385
<table cellpadding="0" cellspacing="0" border="0">
1387
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_set_metadata </td>
1388
<td class="md" valign="top">( </td>
1389
<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>
1395
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> ** </td>
1396
<td class="mdname" nowrap> <em>metadata</em>, </td>
1401
<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#a23">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#a34">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>
1785
<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>
2714
<td class="md" nowrap>unsigned </td>
2715
<td class="mdname" nowrap> <em>samples</em></td>
2719
<td class="md">) </td>
2720
<td class="md" colspan="2"></td>
2727
<table cellspacing=5 cellpadding=0 border=0>
2735
Submit data for encoding. This version allows you to supply the input data via an array of pointers, each pointer pointing to an array of <em>samples</em> samples representing one channel. The samples need not be block-aligned, but each channel should have the same number of samples.<dl compact><dt><b>
2736
Parameters: </b><dd>
2737
<table border=0 cellspacing=2 cellpadding=0>
2738
<tr><td valign=top><em>encoder</em> </td><td>
2739
An initialized encoder instance in the OK state. </td></tr>
2740
<tr><td valign=top><em>buffer</em> </td><td>
2741
An array of pointers to each channel's signal. </td></tr>
2742
<tr><td valign=top><em>samples</em> </td><td>
2743
The number of samples in one channel. </td></tr>
2745
</dl><dl compact><dt><b>
2747
<div class="fragment"><pre>encoder != NULL
2748
</pre></div> <div class="fragment"><pre><a class="code" href="FLAC_2stream__encoder_8h.html#a27">FLAC__stream_encoder_get_state</a>(encoder) == <a class="code" href="FLAC_2stream__encoder_8h.html#a52a4">FLAC__STREAM_ENCODER_OK</a>
2749
</pre></div> </dl><dl compact><dt><b>
2750
Return values: </b><dd>
2751
<table border=0 cellspacing=2 cellpadding=0>
2752
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2753
<code>true</code> if successful, else <code>false</code>; in this case, check the encoder state with <a class="el" href="group__flac__stream__encoder.html#a27">FLAC__stream_encoder_get_state</a>() to see what went wrong. </td></tr>
2758
<a name="a51" doxytag="stream_encoder.h::FLAC__stream_encoder_process_interleaved"></a><p>
2759
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2762
<table cellpadding="0" cellspacing="0" border="0">
2764
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_encoder_process_interleaved </td>
2765
<td class="md" valign="top">( </td>
2766
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> * </td>
2767
<td class="mdname" nowrap> <em>encoder</em>, </td>
2772
<td class="md" nowrap>const FLAC__int32 </td>
2773
<td class="mdname" nowrap> <em>buffer</em>[], </td>
2778
<td class="md" nowrap>unsigned </td>
2779
<td class="mdname" nowrap> <em>samples</em></td>
2783
<td class="md">) </td>
2784
<td class="md" colspan="2"></td>
2791
<table cellspacing=5 cellpadding=0 border=0>
2799
Submit data for encoding. This version allows you to supply the input data where the channels are interleaved into a single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). 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.<dl compact><dt><b>
2800
Parameters: </b><dd>
2801
<table border=0 cellspacing=2 cellpadding=0>
2802
<tr><td valign=top><em>encoder</em> </td><td>
2803
An initialized encoder instance in the OK state. </td></tr>
2804
<tr><td valign=top><em>buffer</em> </td><td>
2805
An array of channel-interleaved data (see above). </td></tr>
2806
<tr><td valign=top><em>samples</em> </td><td>
2807
The number of samples in one channel, the same as for <a class="el" href="group__flac__stream__encoder.html#a50">FLAC__stream_encoder_process</a>(). For example, if encoding two channels, <code>1000</code> <em>samples</em> corresponds to a <em>buffer</em> of 2000 values. </td></tr>
2809
</dl><dl compact><dt><b>
2811
<div class="fragment"><pre>encoder != NULL
2812
</pre></div> <div class="fragment"><pre><a class="code" href="FLAC_2stream__encoder_8h.html#a27">FLAC__stream_encoder_get_state</a>(encoder) == <a class="code" href="FLAC_2stream__encoder_8h.html#a52a4">FLAC__STREAM_ENCODER_OK</a>
2813
</pre></div> </dl><dl compact><dt><b>
2814
Return values: </b><dd>
2815
<table border=0 cellspacing=2 cellpadding=0>
2816
<tr><td valign=top><em>FLAC__bool</em> </td><td>
2817
<code>true</code> if successful, else <code>false</code>; in this case, check the encoder state with <a class="el" href="group__flac__stream__encoder.html#a27">FLAC__stream_encoder_get_state</a>() to see what went wrong. </td></tr>
2822
<hr><h2>Variable Documentation</h2>
2823
<a name="a0" doxytag="stream_encoder.h::FLAC__StreamEncoderStateString"></a><p>
2824
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2827
<table cellpadding="0" cellspacing="0" border="0">
2829
<td class="md" nowrap valign="top"> const char* const FLAC__StreamEncoderStateString[]
2834
<table cellspacing=5 cellpadding=0 border=0>
2842
Maps a FLAC__StreamEncoderState to a C string.
2844
Using a FLAC__StreamEncoderState as the index to this array will give the string equivalent. The contents should not be modified. </td>
2847
<a name="a1" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteStatusString"></a><p>
2848
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2851
<table cellpadding="0" cellspacing="0" border="0">
2853
<td class="md" nowrap valign="top"> const char* const FLAC__StreamEncoderWriteStatusString[]
2858
<table cellspacing=5 cellpadding=0 border=0>
2866
Maps a FLAC__StreamEncoderWriteStatus to a C string.
2868
Using a FLAC__StreamEncoderWriteStatus as the index to this array will give the string equivalent. The contents should not be modified. </td>
2871
<hr><address><small>Generated on Sat Jan 25 10:44:57 2003 for FLAC by
2872
<a href="http://www.doxygen.org/index.html">
2873
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
2874
width=110 height=53></a>1.2.14 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
2875
© 1997-2002</small></address>