1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>FLAC/stream_decoder.h: stream decoder interface</title>
3
<title>FLAC: FLAC/stream_decoder.h: stream decoder interface</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.2.14 -->
8
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
9
<hr><h1>FLAC/stream_decoder.h: stream decoder interface<br>
6
<!-- Generated by Doxygen 1.4.2 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8
<h1>FLAC/stream_decoder.h: stream decoder interface<br>
11
10
[<a class="el" href="group__flac__decoder.html">FLAC/_decoder.h: decoder interfaces</a>]</small>
12
</h1>This module contains the functions which implement the stream decoder.
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____StreamDecoder.html">FLAC__StreamDecoder</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__decoder.html#a37">FLAC__StreamDecoderReadStatus</a>(* </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a4">FLAC__StreamDecoderReadCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)</td></tr>
18
<tr><td nowrap align=right valign=top>typedef <a class="el" href="group__flac__stream__decoder.html#a38">FLAC__StreamDecoderWriteStatus</a>(* </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a5">FLAC__StreamDecoderWriteCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, const FLAC__int32 *const buffer[], void *client_data)</td></tr>
19
<tr><td nowrap align=right valign=top>typedef void(* </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a6">FLAC__StreamDecoderMetadataCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)</td></tr>
20
<tr><td nowrap align=right valign=top>typedef void(* </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a7">FLAC__StreamDecoderErrorCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a39">FLAC__StreamDecoderErrorStatus</a> status, void *client_data)</td></tr>
21
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>
22
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> { <br>
23
<a class="el" href="group__flac__stream__decoder.html#a36a8">FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</a> = 0,
24
<a class="el" href="group__flac__stream__decoder.html#a36a9">FLAC__STREAM_DECODER_READ_METADATA</a>,
25
<a class="el" href="group__flac__stream__decoder.html#a36a10">FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC</a>,
26
<a class="el" href="group__flac__stream__decoder.html#a36a11">FLAC__STREAM_DECODER_READ_FRAME</a>,
28
<a class="el" href="group__flac__stream__decoder.html#a36a12">FLAC__STREAM_DECODER_END_OF_STREAM</a>,
29
<a class="el" href="group__flac__stream__decoder.html#a36a13">FLAC__STREAM_DECODER_ABORTED</a>,
30
<a class="el" href="group__flac__stream__decoder.html#a36a14">FLAC__STREAM_DECODER_UNPARSEABLE_STREAM</a>,
31
<a class="el" href="group__flac__stream__decoder.html#a36a15">FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR</a>,
33
<a class="el" href="group__flac__stream__decoder.html#a36a16">FLAC__STREAM_DECODER_ALREADY_INITIALIZED</a>,
34
<a class="el" href="group__flac__stream__decoder.html#a36a17">FLAC__STREAM_DECODER_INVALID_CALLBACK</a>,
35
<a class="el" href="group__flac__stream__decoder.html#a36a18">FLAC__STREAM_DECODER_UNINITIALIZED</a>
38
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a37">FLAC__StreamDecoderReadStatus</a> { <a class="el" href="group__flac__stream__decoder.html#a37a19">FLAC__STREAM_DECODER_READ_STATUS_CONTINUE</a>,
39
<a class="el" href="group__flac__stream__decoder.html#a37a20">FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</a>,
40
<a class="el" href="group__flac__stream__decoder.html#a37a21">FLAC__STREAM_DECODER_READ_STATUS_ABORT</a>
42
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a38">FLAC__StreamDecoderWriteStatus</a> { <a class="el" href="group__flac__stream__decoder.html#a38a22">FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE</a>,
43
<a class="el" href="group__flac__stream__decoder.html#a38a23">FLAC__STREAM_DECODER_WRITE_STATUS_ABORT</a>
45
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a39">FLAC__StreamDecoderErrorStatus</a> { <a class="el" href="group__flac__stream__decoder.html#a39a24">FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC</a>,
46
<a class="el" href="group__flac__stream__decoder.html#a39a25">FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER</a>,
47
<a class="el" href="group__flac__stream__decoder.html#a39a26">FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH</a>
49
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
50
<tr><td nowrap align=right valign=top><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a8">FLAC__stream_decoder_new</a> ()</td></tr>
51
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a9">FLAC__stream_decoder_delete</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
52
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a10">FLAC__stream_decoder_set_read_callback</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a4">FLAC__StreamDecoderReadCallback</a> value)</td></tr>
53
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a11">FLAC__stream_decoder_set_write_callback</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a5">FLAC__StreamDecoderWriteCallback</a> value)</td></tr>
54
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a12">FLAC__stream_decoder_set_metadata_callback</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a6">FLAC__StreamDecoderMetadataCallback</a> value)</td></tr>
55
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a13">FLAC__stream_decoder_set_error_callback</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a7">FLAC__StreamDecoderErrorCallback</a> value)</td></tr>
56
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a14">FLAC__stream_decoder_set_client_data</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, void *value)</td></tr>
57
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a15">FLAC__stream_decoder_set_metadata_respond</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> type)</td></tr>
58
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a16">FLAC__stream_decoder_set_metadata_respond_application</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const FLAC__byte id[4])</td></tr>
59
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a17">FLAC__stream_decoder_set_metadata_respond_all</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
60
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a18">FLAC__stream_decoder_set_metadata_ignore</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> type)</td></tr>
61
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a19">FLAC__stream_decoder_set_metadata_ignore_application</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const FLAC__byte id[4])</td></tr>
62
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a20">FLAC__stream_decoder_set_metadata_ignore_all</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
63
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a21">FLAC__stream_decoder_get_state</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
64
<tr><td nowrap align=right valign=top>const char * </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a22">FLAC__stream_decoder_get_resolved_state_string</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
65
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a23">FLAC__stream_decoder_get_channels</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
66
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__format.html#a95">FLAC__ChannelAssignment</a> </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a24">FLAC__stream_decoder_get_channel_assignment</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
67
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a25">FLAC__stream_decoder_get_bits_per_sample</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
68
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a26">FLAC__stream_decoder_get_sample_rate</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
69
<tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a27">FLAC__stream_decoder_get_blocksize</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
70
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
71
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
72
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a30">FLAC__stream_decoder_flush</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
73
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a31">FLAC__stream_decoder_reset</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
74
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a32">FLAC__stream_decoder_process_single</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
75
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a33">FLAC__stream_decoder_process_until_end_of_metadata</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
76
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a34">FLAC__stream_decoder_process_until_end_of_stream</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
77
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a35">FLAC__stream_decoder_skip_single_frame</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
78
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
79
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a0">FLAC__StreamDecoderStateString</a> []</td></tr>
80
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a1">FLAC__StreamDecoderReadStatusString</a> []</td></tr>
81
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a2">FLAC__StreamDecoderWriteStatusString</a> []</td></tr>
82
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__stream__decoder.html#a3">FLAC__StreamDecoderErrorStatusString</a> []</td></tr>
84
<hr><a name="_details"></a><h2>Detailed Description</h2>
85
This module contains the functions which implement the stream decoder.
89
The basic usage of this decoder is as follows:<ul>
90
<li>The program creates an instance of a decoder using <a class="el" href="group__flac__stream__decoder.html#a8">FLAC__stream_decoder_new</a>().<li>The program overrides the default settings and sets callbacks for reading, writing, error reporting, and metadata reporting using FLAC__stream_decoder_set_*() functions.<li>The program initializes the instance to validate the settings and prepare for decoding using <a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a>().<li>The program calls the FLAC__stream_decoder_process_*() functions to decode data, which subsequently calls the callbacks.<li>The program finishes the decoding with <a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>(), which flushes the input and output and resets the decoder to the uninitialized state.<li>The instance may be used again or deleted with <a class="el" href="group__flac__stream__decoder.html#a9">FLAC__stream_decoder_delete</a>().</ul>
91
In more detail, the program will create a new instance by calling <a class="el" href="group__flac__stream__decoder.html#a8">FLAC__stream_decoder_new</a>(), then call FLAC__stream_decoder_set_*() functions to set the callbacks and client data, and call <a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a>(). The required callbacks are:
94
<li>Read callback - This function will be called when the decoder needs more input data. The address of the buffer to be filled is supplied, along with the number of bytes the buffer can hold. The callback may choose to supply less data and modify the byte count but must be careful not to overflow the buffer. The callback then returns a status code chosen from FLAC__StreamDecoderReadStatus.<li>Write callback - This function will be called when the decoder has decoded a single frame of data. The decoder will pass the frame metadata as well as an array of pointers (one for each channel) pointing to the decoded audio.<li>Metadata callback - This function will be called when the decoder has decoded a metadata block. In a valid FLAC file there will always be one STREAMINFO block, followed by zero or more other metadata blocks. These will be supplied by the decoder in the same order as they appear in the stream and always before the first audio frame (i.e. write callback). The metadata block that is passed in must not be modified, and it doesn't live beyond the callback, so you should make a copy of it with <a class="el" href="group__flac__metadata__object.html#a1">FLAC__metadata_object_clone</a>() if you will need it elsewhere. Since metadata blocks can potentially be large, by default the decoder only calls the metadata callback for the STREAMINFO block; you can instruct the decoder to pass or filter other blocks with FLAC__stream_decoder_set_metadata_*() calls.<li>Error callback - This function will be called whenever an error occurs during decoding.</ul>
95
Once the decoder is initialized, your program will call one of several functions to start the decoding process:
98
<li><a class="el" href="group__flac__stream__decoder.html#a32">FLAC__stream_decoder_process_single</a>() - Tells the decoder to process at most one metadata block or audio frame and return, calling either the metadata callback or write callback, respectively, once. If the decoder loses sync it will return with only the error callback being called.<li><a class="el" href="group__flac__stream__decoder.html#a33">FLAC__stream_decoder_process_until_end_of_metadata</a>() - Tells the decoder to process the stream from the current location and stop upon reaching the first audio frame. The user will get one metadata, write, or error callback per metadata block, audio frame, or sync error, respectively.<li><a class="el" href="group__flac__stream__decoder.html#a34">FLAC__stream_decoder_process_until_end_of_stream</a>() - Tells the decoder to process the stream from the current location until the read callback returns FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM or FLAC__STREAM_DECODER_READ_STATUS_ABORT. The user will get one metadata, write, or error callback per metadata block, audio frame, or sync error, respectively.</ul>
99
When the decoder has finished decoding (normally or through an abort), the instance is finished by calling <a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>(), which ensures the decoder is in the correct state and frees memory. Then the instance may be deleted with <a class="el" href="group__flac__stream__decoder.html#a9">FLAC__stream_decoder_delete</a>() or initialized again to decode another stream.
101
Note that the stream decoder has no real concept of stream position, it just converts data. To seek within a stream the callbacks have only to flush the decoder using <a class="el" href="group__flac__stream__decoder.html#a30">FLAC__stream_decoder_flush</a>() and start feeding data from the new position through the read callback. The seekable stream decoder does just this.
103
The FLAC__stream_decoder_set_metadata_*() functions deserve special attention. By default, the decoder only calls the metadata_callback for the STREAMINFO block. These functions allow you to tell the decoder explicitly which blocks to parse and return via the metadata_callback and/or which to skip. Use a <a class="el" href="group__flac__stream__decoder.html#a17">FLAC__stream_decoder_set_metadata_respond_all</a>(), <a class="el" href="group__flac__stream__decoder.html#a18">FLAC__stream_decoder_set_metadata_ignore</a>() ... or <a class="el" href="group__flac__stream__decoder.html#a20">FLAC__stream_decoder_set_metadata_ignore_all</a>(), <a class="el" href="group__flac__stream__decoder.html#a15">FLAC__stream_decoder_set_metadata_respond</a>() ... sequence to exactly specify which blocks to return. Remember that some metadata blocks can be big so filtering out the ones you don't use can reduce the memory requirements of the decoder. Also note the special forms FLAC__stream_decoder_set_metadata_respond_application(id) and FLAC__stream_decoder_set_metadata_ignore_application(id) for filtering APPLICATION blocks based on the application ID.
105
STREAMINFO and SEEKTABLE blocks are always parsed and used internally, but they still can legally be filtered from the metadata_callback.
109
The "set" functions may only be called when the decoder is in the state FLAC__STREAM_DECODER_UNINITIALIZED, i.e. after <a class="el" href="group__flac__stream__decoder.html#a8">FLAC__stream_decoder_new</a>() or <a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>(), but before <a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a>(). If this is the case they will return <code>true</code>, otherwise <code>false</code>.</dl><dl compact><dt><b>
111
<a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>() resets all settings to the constructor defaults, including the callbacks. </dl><hr><h2>Typedef Documentation</h2>
112
<a name="a4" doxytag="stream_decoder.h::FLAC__StreamDecoderReadCallback"></a><p>
113
<table width="100%" cellpadding="2" cellspacing="0" border="0">
116
<table cellpadding="0" cellspacing="0" border="0">
118
<td class="md" nowrap valign="top"> typedef <a class="el" href="group__flac__stream__decoder.html#a37">FLAC__StreamDecoderReadStatus</a>(* FLAC__StreamDecoderReadCallback)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
123
<table cellspacing=5 cellpadding=0 border=0>
131
Signature for the read callback. See <a class="el" href="group__flac__stream__decoder.html#a10">FLAC__stream_decoder_set_read_callback</a>() for more info.<dl compact><dt><b>
133
<table border=0 cellspacing=2 cellpadding=0>
134
<tr><td valign=top><em>decoder</em> </td><td>
135
The decoder instance calling the callback. </td></tr>
136
<tr><td valign=top><em>buffer</em> </td><td>
137
A pointer to a location for the callee to store data to be decoded. </td></tr>
138
<tr><td valign=top><em>bytes</em> </td><td>
139
A pointer to the size of the buffer. On entry to the callback, it contains the maximum number of bytes that may be stored in <em>buffer</em>. The callee must set it to the actual number of bytes stored (0 in case of error or end-of-stream) before returning. </td></tr>
140
<tr><td valign=top><em>client_data</em> </td><td>
141
The callee's client data set through <a class="el" href="group__flac__stream__decoder.html#a14">FLAC__stream_decoder_set_client_data</a>(). </td></tr>
143
</dl><dl compact><dt><b>
144
Return values: </b><dd>
145
<table border=0 cellspacing=2 cellpadding=0>
146
<tr><td valign=top><em>FLAC__StreamDecoderReadStatus</em> </td><td>
147
The callee's return status. </td></tr>
152
<a name="a5" doxytag="stream_decoder.h::FLAC__StreamDecoderWriteCallback"></a><p>
153
<table width="100%" cellpadding="2" cellspacing="0" border="0">
156
<table cellpadding="0" cellspacing="0" border="0">
158
<td class="md" nowrap valign="top"> typedef <a class="el" href="group__flac__stream__decoder.html#a38">FLAC__StreamDecoderWriteStatus</a>(* FLAC__StreamDecoderWriteCallback)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, const FLAC__int32 * const buffer[], void *client_data)
163
<table cellspacing=5 cellpadding=0 border=0>
171
Signature for the write callback. See <a class="el" href="group__flac__stream__decoder.html#a11">FLAC__stream_decoder_set_write_callback</a>() for more info.<dl compact><dt><b>
173
<table border=0 cellspacing=2 cellpadding=0>
174
<tr><td valign=top><em>decoder</em> </td><td>
175
The decoder instance calling the callback. </td></tr>
176
<tr><td valign=top><em>frame</em> </td><td>
177
The description of the decoded frame. See <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a>. </td></tr>
178
<tr><td valign=top><em>buffer</em> </td><td>
179
An array of pointers to decoded channels of data. Each pointer will point to an array of signed samples of length <em>frame->header.blocksize</em>. Currently, the channel order has no meaning except for stereo streams; in this case channel 0 is left and 1 is right. </td></tr>
180
<tr><td valign=top><em>client_data</em> </td><td>
181
The callee's client data set through <a class="el" href="group__flac__stream__decoder.html#a14">FLAC__stream_decoder_set_client_data</a>(). </td></tr>
183
</dl><dl compact><dt><b>
184
Return values: </b><dd>
185
<table border=0 cellspacing=2 cellpadding=0>
186
<tr><td valign=top><em>FLAC__StreamDecoderWriteStatus</em> </td><td>
187
The callee's return status. </td></tr>
192
<a name="a6" doxytag="stream_decoder.h::FLAC__StreamDecoderMetadataCallback"></a><p>
193
<table width="100%" cellpadding="2" cellspacing="0" border="0">
196
<table cellpadding="0" cellspacing="0" border="0">
198
<td class="md" nowrap valign="top"> typedef void(* FLAC__StreamDecoderMetadataCallback)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)
203
<table cellspacing=5 cellpadding=0 border=0>
211
Signature for the metadata callback. See <a class="el" href="group__flac__stream__decoder.html#a12">FLAC__stream_decoder_set_metadata_callback</a>() for more info.<dl compact><dt><b>
213
<table border=0 cellspacing=2 cellpadding=0>
214
<tr><td valign=top><em>decoder</em> </td><td>
215
The decoder instance calling the callback. </td></tr>
216
<tr><td valign=top><em>metadata</em> </td><td>
217
The decoded metadata block. </td></tr>
218
<tr><td valign=top><em>client_data</em> </td><td>
219
The callee's client data set through <a class="el" href="group__flac__stream__decoder.html#a14">FLAC__stream_decoder_set_client_data</a>(). </td></tr>
224
<a name="a7" doxytag="stream_decoder.h::FLAC__StreamDecoderErrorCallback"></a><p>
225
<table width="100%" cellpadding="2" cellspacing="0" border="0">
228
<table cellpadding="0" cellspacing="0" border="0">
230
<td class="md" nowrap valign="top"> typedef void(* FLAC__StreamDecoderErrorCallback)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#a39">FLAC__StreamDecoderErrorStatus</a> status, void *client_data)
235
<table cellspacing=5 cellpadding=0 border=0>
243
Signature for the error callback. See <a class="el" href="group__flac__stream__decoder.html#a13">FLAC__stream_decoder_set_error_callback</a>() for more info.<dl compact><dt><b>
245
<table border=0 cellspacing=2 cellpadding=0>
246
<tr><td valign=top><em>decoder</em> </td><td>
247
The decoder instance calling the callback. </td></tr>
248
<tr><td valign=top><em>status</em> </td><td>
249
The error encountered by the decoder. </td></tr>
250
<tr><td valign=top><em>client_data</em> </td><td>
251
The callee's client data set through <a class="el" href="group__flac__stream__decoder.html#a14">FLAC__stream_decoder_set_client_data</a>(). </td></tr>
11
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
12
This module contains the functions which implement the stream decoder.
14
The stream decoder can decode native FLAC, and optionally Ogg FLAC (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files.<p>
15
The basic usage of this decoder is as follows:<ul>
16
<li>The program creates an instance of a decoder using <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a>.</li><li>The program overrides the default settings using FLAC__stream_decoder_set_*() functions.</li><li>The program initializes the instance to validate the settings and prepare for decoding using<ul>
17
<li><a class="el" href="group__flac__stream__decoder.html#ga36">FLAC__stream_decoder_init_stream()</a> or <a class="el" href="group__flac__stream__decoder.html#ga38">FLAC__stream_decoder_init_FILE()</a> or <a class="el" href="group__flac__stream__decoder.html#ga40">FLAC__stream_decoder_init_file()</a> for native FLAC,</li><li><a class="el" href="group__flac__stream__decoder.html#ga37">FLAC__stream_decoder_init_ogg_stream()</a> or <a class="el" href="group__flac__stream__decoder.html#ga39">FLAC__stream_decoder_init_ogg_FILE()</a> or <a class="el" href="group__flac__stream__decoder.html#ga41">FLAC__stream_decoder_init_ogg_file()</a> for Ogg FLAC</li></ul>
18
</li><li>The program calls the FLAC__stream_decoder_process_*() functions to decode data, which subsequently calls the callbacks.</li><li>The program finishes the decoding with <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a>, which flushes the input and output and resets the decoder to the uninitialized state.</li><li>The instance may be used again or deleted with <a class="el" href="group__flac__stream__decoder.html#ga17">FLAC__stream_decoder_delete()</a>.</li></ul>
20
In more detail, the program will create a new instance by calling <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a>, then call FLAC__stream_decoder_set_*() functions to override the default decoder options, and call one of the FLAC__stream_decoder_init_*() functions.<p>
21
There are three initialization functions for native FLAC, one for setting up the decoder to decode FLAC data from the client via callbacks, and two for decoding directly from a FLAC file.<p>
22
For decoding via callbacks, use <a class="el" href="group__flac__stream__decoder.html#ga36">FLAC__stream_decoder_init_stream()</a>. You must also supply several callbacks for handling I/O. Some (like seeking) are optional, depending on the capabilities of the input.<p>
23
For decoding directly from a file, use <a class="el" href="group__flac__stream__decoder.html#ga38">FLAC__stream_decoder_init_FILE()</a> or <a class="el" href="group__flac__stream__decoder.html#ga40">FLAC__stream_decoder_init_file()</a>. Then you must only supply an open <code>FILE*</code> or filename and fewer callbacks; the decoder will handle the other callbacks internally.<p>
24
There are three similarly-named init functions for decoding from Ogg FLAC streams. Check <code>FLAC_API_SUPPORTS_OGG_FLAC</code> to find out if the library has been built with Ogg support.<p>
25
Once the decoder is initialized, your program will call one of several functions to start the decoding process:<p>
27
<li><a class="el" href="group__flac__stream__decoder.html#ga45">FLAC__stream_decoder_process_single()</a> - Tells the decoder to process at most one metadata block or audio frame and return, calling either the metadata callback or write callback, respectively, once. If the decoder loses sync it will return with only the error callback being called.</li><li><a class="el" href="group__flac__stream__decoder.html#ga46">FLAC__stream_decoder_process_until_end_of_metadata()</a> - Tells the decoder to process the stream from the current location and stop upon reaching the first audio frame. The client will get one metadata, write, or error callback per metadata block, audio frame, or sync error, respectively.</li><li><a class="el" href="group__flac__stream__decoder.html#ga47">FLAC__stream_decoder_process_until_end_of_stream()</a> - Tells the decoder to process the stream from the current location until the read callback returns FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM or FLAC__STREAM_DECODER_READ_STATUS_ABORT. The client will get one metadata, write, or error callback per metadata block, audio frame, or sync error, respectively.</li></ul>
29
When the decoder has finished decoding (normally or through an abort), the instance is finished by calling <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a>, which ensures the decoder is in the correct state and frees memory. Then the instance may be deleted with <a class="el" href="group__flac__stream__decoder.html#ga17">FLAC__stream_decoder_delete()</a> or initialized again to decode another stream.<p>
30
Seeking is exposed through the <a class="el" href="group__flac__stream__decoder.html#ga49">FLAC__stream_decoder_seek_absolute()</a> method. At any point after the stream decoder has been initialized, the client can call this function to seek to an exact sample within the stream. Subsequently, the first time the write callback is called it will be passed a (possibly partial) block starting at that sample.<p>
31
If the client cannot seek via the callback interface provided, but still has another way of seeking, it can flush the decoder using <a class="el" href="group__flac__stream__decoder.html#ga43">FLAC__stream_decoder_flush()</a> and start feeding data from the new position through the read callback.<p>
32
The stream decoder also provides MD5 signature checking. If this is turned on before initialization, <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> will report when the decoded MD5 signature does not match the one stored in the STREAMINFO block. MD5 checking is automatically turned off (until the next <a class="el" href="group__flac__stream__decoder.html#ga44">FLAC__stream_decoder_reset()</a>) if there is no signature in the STREAMINFO block or when a seek is attempted.<p>
33
The FLAC__stream_decoder_set_metadata_*() functions deserve special attention. By default, the decoder only calls the metadata_callback for the STREAMINFO block. These functions allow you to tell the decoder explicitly which blocks to parse and return via the metadata_callback and/or which to skip. Use a <a class="el" href="group__flac__stream__decoder.html#ga22">FLAC__stream_decoder_set_metadata_respond_all()</a>, <a class="el" href="group__flac__stream__decoder.html#ga23">FLAC__stream_decoder_set_metadata_ignore()</a> ... or <a class="el" href="group__flac__stream__decoder.html#ga25">FLAC__stream_decoder_set_metadata_ignore_all()</a>, <a class="el" href="group__flac__stream__decoder.html#ga20">FLAC__stream_decoder_set_metadata_respond()</a> ... sequence to exactly specify which blocks to return. Remember that metadata blocks can potentially be big (for example, cover art) so filtering out the ones you don't use can reduce the memory requirements of the decoder. Also note the special forms FLAC__stream_decoder_set_metadata_respond_application(id) and FLAC__stream_decoder_set_metadata_ignore_application(id) for filtering APPLICATION blocks based on the application ID.<p>
34
STREAMINFO and SEEKTABLE blocks are always parsed and used internally, but they still can legally be filtered from the metadata_callback.<p>
35
<dl compact><dt><b>Note:</b></dt><dd>The "set" functions may only be called when the decoder is in the state FLAC__STREAM_DECODER_UNINITIALIZED, i.e. after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> or <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a>, but before FLAC__stream_decoder_init_*(). If this is the case they will return <code>true</code>, otherwise <code>false</code>.<p>
36
<a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> resets all settings to the constructor defaults, including the callbacks. </dd></dl>
39
<table border="0" cellpadding="0" cellspacing="0">
41
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a></td></tr>
44
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga52">FLAC__StreamDecoderReadStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)</td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)</td></tr>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)</td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *stream_length, void *client_data)</td></tr>
53
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef FLAC__bool(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, void *client_data)</td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga56">FLAC__StreamDecoderWriteStatus</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, const FLAC__int32 *const buffer[], void *client_data)</td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)</td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> )(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#ga57">FLAC__StreamDecoderErrorStatus</a> status, void *client_data)</td></tr>
61
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
62
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> { <br>
63
<a class="el" href="group__flac__stream__decoder.html#gga50a16">FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</a> = 0,
64
<a class="el" href="group__flac__stream__decoder.html#gga50a17">FLAC__STREAM_DECODER_READ_METADATA</a>,
65
<a class="el" href="group__flac__stream__decoder.html#gga50a18">FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC</a>,
66
<a class="el" href="group__flac__stream__decoder.html#gga50a19">FLAC__STREAM_DECODER_READ_FRAME</a>,
68
<a class="el" href="group__flac__stream__decoder.html#gga50a20">FLAC__STREAM_DECODER_END_OF_STREAM</a>,
69
<a class="el" href="group__flac__stream__decoder.html#gga50a21">FLAC__STREAM_DECODER_OGG_ERROR</a>,
70
<a class="el" href="group__flac__stream__decoder.html#gga50a22">FLAC__STREAM_DECODER_SEEK_ERROR</a>,
71
<a class="el" href="group__flac__stream__decoder.html#gga50a23">FLAC__STREAM_DECODER_ABORTED</a>,
73
<a class="el" href="group__flac__stream__decoder.html#gga50a24">FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR</a>,
74
<a class="el" href="group__flac__stream__decoder.html#gga50a25">FLAC__STREAM_DECODER_UNINITIALIZED</a>
78
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> { <br>
79
<a class="el" href="group__flac__stream__decoder.html#gga51a26">FLAC__STREAM_DECODER_INIT_STATUS_OK</a> = 0,
80
<a class="el" href="group__flac__stream__decoder.html#gga51a27">FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER</a>,
81
<a class="el" href="group__flac__stream__decoder.html#gga51a28">FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS</a>,
82
<a class="el" href="group__flac__stream__decoder.html#gga51a29">FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR</a>,
84
<a class="el" href="group__flac__stream__decoder.html#gga51a30">FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE</a>,
85
<a class="el" href="group__flac__stream__decoder.html#gga51a31">FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED</a>
89
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga52">FLAC__StreamDecoderReadStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga52a32">FLAC__STREAM_DECODER_READ_STATUS_CONTINUE</a>,
90
<a class="el" href="group__flac__stream__decoder.html#gga52a33">FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</a>,
91
<a class="el" href="group__flac__stream__decoder.html#gga52a34">FLAC__STREAM_DECODER_READ_STATUS_ABORT</a>
94
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga53a35">FLAC__STREAM_DECODER_SEEK_STATUS_OK</a>,
95
<a class="el" href="group__flac__stream__decoder.html#gga53a36">FLAC__STREAM_DECODER_SEEK_STATUS_ERROR</a>,
96
<a class="el" href="group__flac__stream__decoder.html#gga53a37">FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</a>
99
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga54a38">FLAC__STREAM_DECODER_TELL_STATUS_OK</a>,
100
<a class="el" href="group__flac__stream__decoder.html#gga54a39">FLAC__STREAM_DECODER_TELL_STATUS_ERROR</a>,
101
<a class="el" href="group__flac__stream__decoder.html#gga54a40">FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</a>
104
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga55a41">FLAC__STREAM_DECODER_LENGTH_STATUS_OK</a>,
105
<a class="el" href="group__flac__stream__decoder.html#gga55a42">FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR</a>,
106
<a class="el" href="group__flac__stream__decoder.html#gga55a43">FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED</a>
109
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga56">FLAC__StreamDecoderWriteStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga56a44">FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE</a>,
110
<a class="el" href="group__flac__stream__decoder.html#gga56a45">FLAC__STREAM_DECODER_WRITE_STATUS_ABORT</a>
113
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga57">FLAC__StreamDecoderErrorStatus</a> { <a class="el" href="group__flac__stream__decoder.html#gga57a46">FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC</a>,
114
<a class="el" href="group__flac__stream__decoder.html#gga57a47">FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER</a>,
115
<a class="el" href="group__flac__stream__decoder.html#gga57a48">FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH</a>,
116
<a class="el" href="group__flac__stream__decoder.html#gga57a49">FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM</a>
119
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
120
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new</a> (void)</td></tr>
122
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga17">FLAC__stream_decoder_delete</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
124
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga18">FLAC__stream_decoder_set_ogg_serial_number</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, long serial_number)</td></tr>
126
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga19">FLAC__stream_decoder_set_md5_checking</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__bool value)</td></tr>
128
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga20">FLAC__stream_decoder_set_metadata_respond</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> type)</td></tr>
130
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga21">FLAC__stream_decoder_set_metadata_respond_application</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const FLAC__byte id[4])</td></tr>
132
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga22">FLAC__stream_decoder_set_metadata_respond_all</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
134
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga23">FLAC__stream_decoder_set_metadata_ignore</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> type)</td></tr>
136
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga24">FLAC__stream_decoder_set_metadata_ignore_application</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const FLAC__byte id[4])</td></tr>
138
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga25">FLAC__stream_decoder_set_metadata_ignore_all</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
140
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
142
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga27">FLAC__stream_decoder_get_resolved_state_string</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
144
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga28">FLAC__stream_decoder_get_md5_checking</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
146
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__uint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga29">FLAC__stream_decoder_get_total_samples</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
148
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga30">FLAC__stream_decoder_get_channels</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
150
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__format.html#ga107">FLAC__ChannelAssignment</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga31">FLAC__stream_decoder_get_channel_assignment</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
152
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga32">FLAC__stream_decoder_get_bits_per_sample</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
154
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga33">FLAC__stream_decoder_get_sample_rate</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
156
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga34">FLAC__stream_decoder_get_blocksize</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
158
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga35">FLAC__stream_decoder_get_decode_position</a> (const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *position)</td></tr>
160
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga36">FLAC__stream_decoder_init_stream</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a> read_callback, <a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a> length_callback, <a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a> eof_callback, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
162
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga37">FLAC__stream_decoder_init_ogg_stream</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a> read_callback, <a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a> length_callback, <a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a> eof_callback, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
164
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga38">FLAC__stream_decoder_init_FILE</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FILE *file, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
166
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga39">FLAC__stream_decoder_init_ogg_FILE</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FILE *file, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
168
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga40">FLAC__stream_decoder_init_file</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const char *filename, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
170
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga41">FLAC__stream_decoder_init_ogg_file</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const char *filename, <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> metadata_callback, <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> error_callback, void *client_data)</td></tr>
172
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
174
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga43">FLAC__stream_decoder_flush</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
176
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga44">FLAC__stream_decoder_reset</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
178
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga45">FLAC__stream_decoder_process_single</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
180
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga46">FLAC__stream_decoder_process_until_end_of_metadata</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
182
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga47">FLAC__stream_decoder_process_until_end_of_stream</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
184
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga48">FLAC__stream_decoder_skip_single_frame</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder)</td></tr>
186
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga49">FLAC__stream_decoder_seek_absolute</a> (<a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 sample)</td></tr>
188
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
189
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga0">FLAC__StreamDecoderStateString</a> []</td></tr>
191
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga1">FLAC__StreamDecoderInitStatusString</a> []</td></tr>
193
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga2">FLAC__StreamDecoderReadStatusString</a> []</td></tr>
195
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga3">FLAC__StreamDecoderSeekStatusString</a> []</td></tr>
197
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga4">FLAC__StreamDecoderTellStatusString</a> []</td></tr>
199
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga5">FLAC__StreamDecoderLengthStatusString</a> []</td></tr>
201
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga6">FLAC__StreamDecoderWriteStatusString</a> []</td></tr>
203
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga7">FLAC__StreamDecoderErrorStatusString</a> []</td></tr>
206
<hr><h2>Typedef Documentation</h2>
207
<a class="anchor" name="ga8" doxytag="stream_decoder.h::FLAC__StreamDecoderReadCallback"></a><p>
208
<table class="mdTable" cellpadding="2" cellspacing="0">
211
<table cellpadding="0" cellspacing="0" border="0">
213
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga52">FLAC__StreamDecoderReadStatus</a>(* <a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) </td>
219
<table cellspacing="5" cellpadding="0" border="0">
227
Signature for the read callback.<p>
228
A function pointer matching this signature must be passed to FLAC__stream_decoder_init*_stream(). The supplied function will be called when the decoder needs more input data. The address of the buffer to be filled is supplied, along with the number of bytes the buffer can hold. The callback may choose to supply less data and modify the byte count but must be careful not to overflow the buffer. The callback then returns a status code chosen from FLAC__StreamDecoderReadStatus.<p>
229
Here is an example of a read callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__decoder.html#ga52">FLAC__StreamDecoderReadStatus</a> read_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__byte buffer[], size_t *bytes, <span class="keywordtype">void</span> *client_data)
231
FILE *file = ((MyClientData*)client_data)->file;
232
<span class="keywordflow">if</span>(*bytes > 0) {
233
*bytes = fread(buffer, <span class="keyword">sizeof</span>(FLAC__byte), *bytes, file);
234
<span class="keywordflow">if</span>(ferror(file))
235
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga52a34">FLAC__STREAM_DECODER_READ_STATUS_ABORT</a>;
236
<span class="keywordflow">else</span> <span class="keywordflow">if</span>(*bytes == 0)
237
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga52a33">FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</a>;
238
<span class="keywordflow">else</span>
239
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga52a32">FLAC__STREAM_DECODER_READ_STATUS_CONTINUE</a>;
241
<span class="keywordflow">else</span>
242
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga52a34">FLAC__STREAM_DECODER_READ_STATUS_ABORT</a>;
245
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
246
<dl compact><dt><b>Parameters:</b></dt><dd>
247
<table border="0" cellspacing="2" cellpadding="0">
248
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
249
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A pointer to a location for the callee to store data to be decoded. </td></tr>
250
<tr><td valign="top"></td><td valign="top"><em>bytes</em> </td><td>A pointer to the size of the buffer. On entry to the callback, it contains the maximum number of bytes that may be stored in <em>buffer</em>. The callee must set it to the actual number of bytes stored (0 in case of error or end-of-stream) before returning. </td></tr>
251
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
254
<dl compact><dt><b>Return values:</b></dt><dd>
255
<table border="0" cellspacing="2" cellpadding="0">
256
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderReadStatus</em> </td><td>The callee's return status. Note that the callback should return <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code> if and only if zero bytes were read and there is no more data to be read. </td></tr>
262
<a class="anchor" name="ga9" doxytag="stream_decoder.h::FLAC__StreamDecoderSeekCallback"></a><p>
263
<table class="mdTable" cellpadding="2" cellspacing="0">
266
<table cellpadding="0" cellspacing="0" border="0">
268
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a>(* <a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) </td>
274
<table cellspacing="5" cellpadding="0" border="0">
282
Signature for the seek callback.<p>
283
A function pointer matching this signature may be passed to FLAC__stream_decoder_init*_stream(). The supplied function will be called when the decoder needs to seek the input stream. The decoder will pass the absolute byte offset to seek to, 0 meaning the beginning of the stream.<p>
284
Here is an example of a seek callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a> seek_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
286
FILE *file = ((MyClientData*)client_data)->file;
287
<span class="keywordflow">if</span>(file == stdin)
288
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga53a37">FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</a>;
289
<span class="keywordflow">else</span> <span class="keywordflow">if</span>(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0)
290
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga53a36">FLAC__STREAM_DECODER_SEEK_STATUS_ERROR</a>;
291
<span class="keywordflow">else</span>
292
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga53a35">FLAC__STREAM_DECODER_SEEK_STATUS_OK</a>;
295
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
296
<dl compact><dt><b>Parameters:</b></dt><dd>
297
<table border="0" cellspacing="2" cellpadding="0">
298
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
299
<tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em> </td><td>The offset from the beginning of the stream to seek to. </td></tr>
300
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
303
<dl compact><dt><b>Return values:</b></dt><dd>
304
<table border="0" cellspacing="2" cellpadding="0">
305
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderSeekStatus</em> </td><td>The callee's return status. </td></tr>
311
<a class="anchor" name="ga10" doxytag="stream_decoder.h::FLAC__StreamDecoderTellCallback"></a><p>
312
<table class="mdTable" cellpadding="2" cellspacing="0">
315
<table cellpadding="0" cellspacing="0" border="0">
317
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a>(* <a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) </td>
323
<table cellspacing="5" cellpadding="0" border="0">
331
Signature for the tell callback.<p>
332
A function pointer matching this signature may be passed to FLAC__stream_decoder_init*_stream(). The supplied function will be called when the decoder wants to know the current position of the stream. The callback should return the byte offset from the beginning of the stream.<p>
333
Here is an example of a tell callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a> tell_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
335
FILE *file = ((MyClientData*)client_data)->file;
337
<span class="keywordflow">if</span>(file == stdin)
338
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga54a40">FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</a>;
339
<span class="keywordflow">else</span> <span class="keywordflow">if</span>((pos = ftello(file)) < 0)
340
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga54a39">FLAC__STREAM_DECODER_TELL_STATUS_ERROR</a>;
341
<span class="keywordflow">else</span> {
342
*absolute_byte_offset = (FLAC__uint64)pos;
343
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga54a38">FLAC__STREAM_DECODER_TELL_STATUS_OK</a>;
347
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
348
<dl compact><dt><b>Parameters:</b></dt><dd>
349
<table border="0" cellspacing="2" cellpadding="0">
350
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
351
<tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em> </td><td>A pointer to storage for the current offset from the beginning of the stream. </td></tr>
352
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
355
<dl compact><dt><b>Return values:</b></dt><dd>
356
<table border="0" cellspacing="2" cellpadding="0">
357
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderTellStatus</em> </td><td>The callee's return status. </td></tr>
363
<a class="anchor" name="ga11" doxytag="stream_decoder.h::FLAC__StreamDecoderLengthCallback"></a><p>
364
<table class="mdTable" cellpadding="2" cellspacing="0">
367
<table cellpadding="0" cellspacing="0" border="0">
369
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a>(* <a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *stream_length, void *client_data) </td>
375
<table cellspacing="5" cellpadding="0" border="0">
383
Signature for the length callback.<p>
384
A function pointer matching this signature may be passed to FLAC__stream_decoder_init*_stream(). The supplied function will be called when the decoder wants to know the total length of the stream in bytes.<p>
385
Here is an example of a length callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a> length_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, FLAC__uint64 *stream_length, <span class="keywordtype">void</span> *client_data)
387
FILE *file = ((MyClientData*)client_data)->file;
388
<span class="keyword">struct </span>stat filestats;
390
<span class="keywordflow">if</span>(file == stdin)
391
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga55a43">FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED</a>;
392
<span class="keywordflow">else</span> <span class="keywordflow">if</span>(fstat(fileno(file), &filestats) != 0)
393
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga55a42">FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR</a>;
394
<span class="keywordflow">else</span> {
395
*stream_length = (FLAC__uint64)filestats.st_size;
396
<span class="keywordflow">return</span> <a class="code" href="group__flac__stream__decoder.html#gga55a41">FLAC__STREAM_DECODER_LENGTH_STATUS_OK</a>;
400
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
401
<dl compact><dt><b>Parameters:</b></dt><dd>
402
<table border="0" cellspacing="2" cellpadding="0">
403
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
404
<tr><td valign="top"></td><td valign="top"><em>stream_length</em> </td><td>A pointer to storage for the length of the stream in bytes. </td></tr>
405
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
408
<dl compact><dt><b>Return values:</b></dt><dd>
409
<table border="0" cellspacing="2" cellpadding="0">
410
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderLengthStatus</em> </td><td>The callee's return status. </td></tr>
416
<a class="anchor" name="ga12" doxytag="stream_decoder.h::FLAC__StreamDecoderEofCallback"></a><p>
417
<table class="mdTable" cellpadding="2" cellspacing="0">
420
<table cellpadding="0" cellspacing="0" border="0">
422
<td class="md" nowrap valign="top">typedef FLAC__bool(* <a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, void *client_data) </td>
428
<table cellspacing="5" cellpadding="0" border="0">
436
Signature for the EOF callback.<p>
437
A function pointer matching this signature may be passed to FLAC__stream_decoder_init*_stream(). The supplied function will be called when the decoder needs to know if the end of the stream has been reached.<p>
438
Here is an example of a EOF callback for stdio streams: FLAC__bool eof_cb(const FLAC__StreamDecoder *decoder, void *client_data) <div class="fragment"><pre class="fragment"> {
439
FILE *file = ((MyClientData*)client_data)->file;
440
<span class="keywordflow">return</span> feof(file)? <span class="keyword">true</span> : <span class="keyword">false</span>;
443
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
444
<dl compact><dt><b>Parameters:</b></dt><dd>
445
<table border="0" cellspacing="2" cellpadding="0">
446
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
447
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
450
<dl compact><dt><b>Return values:</b></dt><dd>
451
<table border="0" cellspacing="2" cellpadding="0">
452
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if the currently at the end of the stream, else <code>false</code>. </td></tr>
458
<a class="anchor" name="ga13" doxytag="stream_decoder.h::FLAC__StreamDecoderWriteCallback"></a><p>
459
<table class="mdTable" cellpadding="2" cellspacing="0">
462
<table cellpadding="0" cellspacing="0" border="0">
464
<td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga56">FLAC__StreamDecoderWriteStatus</a>(* <a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a> *frame, const FLAC__int32 *const buffer[], void *client_data) </td>
470
<table cellspacing="5" cellpadding="0" border="0">
478
Signature for the write callback.<p>
479
A function pointer matching this signature must be passed to one of the FLAC__stream_decoder_init_*() functions. The supplied function will be called when the decoder has decoded a single audio frame. The decoder will pass the frame metadata as well as an array of pointers (one for each channel) pointing to the decoded audio.<p>
480
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
481
<dl compact><dt><b>Parameters:</b></dt><dd>
482
<table border="0" cellspacing="2" cellpadding="0">
483
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
484
<tr><td valign="top"></td><td valign="top"><em>frame</em> </td><td>The description of the decoded frame. See <a class="el" href="structFLAC____Frame.html">FLAC__Frame</a>. </td></tr>
485
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>An array of pointers to decoded channels of data. Each pointer will point to an array of signed samples of length <em>frame->header.blocksize</em>. Channels will be ordered according to the FLAC specification; see the documentation for the <a href="../format.html#frame_header">frame header</a>. </td></tr>
486
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
489
<dl compact><dt><b>Return values:</b></dt><dd>
490
<table border="0" cellspacing="2" cellpadding="0">
491
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderWriteStatus</em> </td><td>The callee's return status. </td></tr>
497
<a class="anchor" name="ga14" doxytag="stream_decoder.h::FLAC__StreamDecoderMetadataCallback"></a><p>
498
<table class="mdTable" cellpadding="2" cellspacing="0">
501
<table cellpadding="0" cellspacing="0" border="0">
503
<td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data) </td>
509
<table cellspacing="5" cellpadding="0" border="0">
517
Signature for the metadata callback.<p>
518
A function pointer matching this signature must be passed to one of the FLAC__stream_decoder_init_*() functions. The supplied function will be called when the decoder has decoded a metadata block. In a valid FLAC file there will always be one <code>STREAMINFO</code> block, followed by zero or more other metadata blocks. These will be supplied by the decoder in the same order as they appear in the stream and always before the first audio frame (i.e. write callback). The metadata block that is passed in must not be modified, and it doesn't live beyond the callback, so you should make a copy of it with <a class="el" href="group__flac__metadata__object.html#ga1">FLAC__metadata_object_clone()</a> if you will need it elsewhere. Since metadata blocks can potentially be large, by default the decoder only calls the metadata callback for the <code>STREAMINFO</code> block; you can instruct the decoder to pass or filter other blocks with FLAC__stream_decoder_set_metadata_*() calls.<p>
519
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
520
<dl compact><dt><b>Parameters:</b></dt><dd>
521
<table border="0" cellspacing="2" cellpadding="0">
522
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
523
<tr><td valign="top"></td><td valign="top"><em>metadata</em> </td><td>The decoded metadata block. </td></tr>
524
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
530
<a class="anchor" name="ga15" doxytag="stream_decoder.h::FLAC__StreamDecoderErrorCallback"></a><p>
531
<table class="mdTable" cellpadding="2" cellspacing="0">
534
<table cellpadding="0" cellspacing="0" border="0">
536
<td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a>)(const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *decoder, <a class="el" href="group__flac__stream__decoder.html#ga57">FLAC__StreamDecoderErrorStatus</a> status, void *client_data) </td>
542
<table cellspacing="5" cellpadding="0" border="0">
550
Signature for the error callback.<p>
551
A function pointer matching this signature must be passed to one of the FLAC__stream_decoder_init_*() functions. The supplied function will be called whenever an error occurs during decoding.<p>
552
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> functions which change the state should not be called on the <em>decoder</em> while in the callback.</dd></dl>
553
<dl compact><dt><b>Parameters:</b></dt><dd>
554
<table border="0" cellspacing="2" cellpadding="0">
555
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>The decoder instance calling the callback. </td></tr>
556
<tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>The error encountered by the decoder. </td></tr>
557
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
256
563
<hr><h2>Enumeration Type Documentation</h2>
257
<a name="a36" doxytag="stream_decoder.h::FLAC__StreamDecoderState"></a><p>
258
<table width="100%" cellpadding="2" cellspacing="0" border="0">
564
<a class="anchor" name="ga50" doxytag="stream_decoder.h::FLAC__StreamDecoderState"></a><p>
565
<table class="mdTable" cellpadding="2" cellspacing="0">
261
568
<table cellpadding="0" cellspacing="0" border="0">
263
<td class="md" nowrap valign="top"> enum FLAC__StreamDecoderState
570
<td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> </td>
268
<table cellspacing=5 cellpadding=0 border=0>
576
<table cellspacing="5" cellpadding="0" border="0">
391
Possible values passed in to the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> error callback. <dl compact><dt><b>
392
Enumeration values:</b><dd>
393
<table border=0 cellspacing=2 cellpadding=0>
394
<tr><td valign=top><em><a name="a39a24" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC"></a><em>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC</em></em> </td><td>
834
Possible values passed back to the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> error callback. <code>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC</code> is the generic catch- all. The rest could be caused by bad sync (false synchronization on data that is not the start of a frame) or corrupted data. The error itself is the decoder's best guess at what happened assuming a correct sync. For example <code>FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER</code> could be caused by a correct sync on the start of a frame, but some data in the frame header was corrupted. Or it could be the result of syncing on a point the stream that looked like the starting of a frame but was not. <code>FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM</code> could be because the decoder encountered a valid frame made by a future version of the encoder which it cannot parse, or because of a false sync making it appear as though an encountered frame was generated by a future encoder. <dl compact><dt><b>Enumeration values: </b></dt><dd>
835
<table border="0" cellspacing="2" cellpadding="0">
836
<tr><td valign="top"><em><a class="anchor" name="gga57a46" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC"></a>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC</em> </td><td>
395
837
An error in the stream caused the decoder to lose synchronization. </td></tr>
396
<tr><td valign=top><em><a name="a39a25" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER"></a><em>FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER</em></em> </td><td>
838
<tr><td valign="top"><em><a class="anchor" name="gga57a47" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER"></a>FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER</em> </td><td>
397
839
The decoder encountered a corrupted frame header. </td></tr>
398
<tr><td valign=top><em><a name="a39a26" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH"></a><em>FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH</em></em> </td><td>
840
<tr><td valign="top"><em><a class="anchor" name="gga57a48" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH"></a>FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH</em> </td><td>
399
841
The frame's data did not match the CRC in the footer. </td></tr>
842
<tr><td valign="top"><em><a class="anchor" name="gga57a49" doxytag="FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM"></a>FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM</em> </td><td>
843
The decoder encountered reserved fields in use in the stream. </td></tr>
405
849
<hr><h2>Function Documentation</h2>
406
<a name="a8" doxytag="stream_decoder.h::FLAC__stream_decoder_new"></a><p>
407
<table width="100%" cellpadding="2" cellspacing="0" border="0">
410
<table cellpadding="0" cellspacing="0" border="0">
412
<td class="md" nowrap valign="top"> <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a>* FLAC__stream_decoder_new </td>
413
<td class="md" valign="top">( </td>
414
<td class="mdname1" valign="top" nowrap> </td>
415
<td class="md" valign="top">) </td>
416
<td class="md" nowrap></td>
423
<table cellspacing=5 cellpadding=0 border=0>
431
Create a new stream decoder instance. The instance is created with default settings; see the individual FLAC__stream_decoder_set_*() functions for each setting's default.<dl compact><dt><b>
432
Return values: </b><dd>
433
<table border=0 cellspacing=2 cellpadding=0>
434
<tr><td valign=top><em><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a></em> </td><td>
435
* <code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
440
<a name="a9" doxytag="stream_decoder.h::FLAC__stream_decoder_delete"></a><p>
441
<table width="100%" cellpadding="2" cellspacing="0" border="0">
444
<table cellpadding="0" cellspacing="0" border="0">
446
<td class="md" nowrap valign="top"> void FLAC__stream_decoder_delete </td>
447
<td class="md" valign="top">( </td>
448
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
449
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
450
<td class="md" valign="top">) </td>
451
<td class="md" nowrap></td>
458
<table cellspacing=5 cellpadding=0 border=0>
466
Free a decoder instance. Deletes the object pointed to by <em>decoder</em>.<dl compact><dt><b>
468
<table border=0 cellspacing=2 cellpadding=0>
469
<tr><td valign=top><em>decoder</em> </td><td>
470
A pointer to an existing decoder. </td></tr>
472
</dl><dl compact><dt><b>
474
<div class="fragment"><pre>decoder != NULL
475
</pre></div> </dl> </td>
478
<a name="a10" doxytag="stream_decoder.h::FLAC__stream_decoder_set_read_callback"></a><p>
479
<table width="100%" cellpadding="2" cellspacing="0" border="0">
482
<table cellpadding="0" cellspacing="0" border="0">
484
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_read_callback </td>
485
<td class="md" valign="top">( </td>
486
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
487
<td class="mdname" nowrap> <em>decoder</em>, </td>
492
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#a4">FLAC__StreamDecoderReadCallback</a> </td>
493
<td class="mdname" nowrap> <em>value</em></td>
497
<td class="md">) </td>
498
<td class="md" colspan="2"></td>
505
<table cellspacing=5 cellpadding=0 border=0>
513
Set the read callback. The supplied function will be called when the decoder needs more input data. The address of the buffer to be filled is supplied, along with the number of bytes the buffer can hold. The callback may choose to supply less data and modify the byte count but must be careful not to overflow the buffer. The callback then returns a status code chosen from FLAC__StreamDecoderReadStatus.
517
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
518
Default Value:</b><dd>
519
<code>NULL</code> </dl><dl compact><dt><b>
521
<table border=0 cellspacing=2 cellpadding=0>
522
<tr><td valign=top><em>decoder</em> </td><td>
523
A decoder instance to set. </td></tr>
524
<tr><td valign=top><em>value</em> </td><td>
525
See above. </td></tr>
527
</dl><dl compact><dt><b>
529
<div class="fragment"><pre>decoder != NULL
530
</pre></div> <div class="fragment"><pre>value != NULL
531
</pre></div> </dl><dl compact><dt><b>
532
Return values: </b><dd>
533
<table border=0 cellspacing=2 cellpadding=0>
534
<tr><td valign=top><em>FLAC__bool</em> </td><td>
535
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
540
<a name="a11" doxytag="stream_decoder.h::FLAC__stream_decoder_set_write_callback"></a><p>
541
<table width="100%" cellpadding="2" cellspacing="0" border="0">
544
<table cellpadding="0" cellspacing="0" border="0">
546
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_write_callback </td>
547
<td class="md" valign="top">( </td>
548
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
549
<td class="mdname" nowrap> <em>decoder</em>, </td>
554
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#a5">FLAC__StreamDecoderWriteCallback</a> </td>
555
<td class="mdname" nowrap> <em>value</em></td>
559
<td class="md">) </td>
560
<td class="md" colspan="2"></td>
567
<table cellspacing=5 cellpadding=0 border=0>
575
Set the write callback. The supplied function will be called when the decoder has decoded a single frame of data. The decoder will pass the frame metadata as well as an array of pointers (one for each channel) pointing to the decoded audio.
579
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
580
Default Value:</b><dd>
581
<code>NULL</code> </dl><dl compact><dt><b>
583
<table border=0 cellspacing=2 cellpadding=0>
584
<tr><td valign=top><em>decoder</em> </td><td>
585
A decoder instance to set. </td></tr>
586
<tr><td valign=top><em>value</em> </td><td>
587
See above. </td></tr>
589
</dl><dl compact><dt><b>
591
<div class="fragment"><pre>decoder != NULL
592
</pre></div> <div class="fragment"><pre>value != NULL
593
</pre></div> </dl><dl compact><dt><b>
594
Return values: </b><dd>
595
<table border=0 cellspacing=2 cellpadding=0>
596
<tr><td valign=top><em>FLAC__bool</em> </td><td>
597
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
602
<a name="a12" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_callback"></a><p>
603
<table width="100%" cellpadding="2" cellspacing="0" border="0">
606
<table cellpadding="0" cellspacing="0" border="0">
608
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_callback </td>
609
<td class="md" valign="top">( </td>
610
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
611
<td class="mdname" nowrap> <em>decoder</em>, </td>
616
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#a6">FLAC__StreamDecoderMetadataCallback</a> </td>
617
<td class="mdname" nowrap> <em>value</em></td>
621
<td class="md">) </td>
622
<td class="md" colspan="2"></td>
629
<table cellspacing=5 cellpadding=0 border=0>
637
Set the metadata callback. The supplied function will be called when the decoder has decoded a metadata block. In a valid FLAC file there will always be one STREAMINFO block, followed by zero or more other metadata blocks. These will be supplied by the decoder in the same order as they appear in the stream and always before the first audio frame (i.e. write callback). The metadata block that is passed in must not be modified, and it doesn't live beyond the callback, so you should make a copy of it with <a class="el" href="group__flac__metadata__object.html#a1">FLAC__metadata_object_clone</a>() if you will need it elsewhere. Since metadata blocks can potentially be large, by default the decoder only calls the metadata callback for the STREAMINFO block; you can instruct the decoder to pass or filter other blocks with FLAC__stream_decoder_set_metadata_*() calls.
641
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
642
Default Value:</b><dd>
643
<code>NULL</code> </dl><dl compact><dt><b>
645
<table border=0 cellspacing=2 cellpadding=0>
646
<tr><td valign=top><em>decoder</em> </td><td>
647
A decoder instance to set. </td></tr>
648
<tr><td valign=top><em>value</em> </td><td>
649
See above. </td></tr>
651
</dl><dl compact><dt><b>
653
<div class="fragment"><pre>decoder != NULL
654
</pre></div> <div class="fragment"><pre>value != NULL
655
</pre></div> </dl><dl compact><dt><b>
656
Return values: </b><dd>
657
<table border=0 cellspacing=2 cellpadding=0>
658
<tr><td valign=top><em>FLAC__bool</em> </td><td>
659
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
664
<a name="a13" doxytag="stream_decoder.h::FLAC__stream_decoder_set_error_callback"></a><p>
665
<table width="100%" cellpadding="2" cellspacing="0" border="0">
668
<table cellpadding="0" cellspacing="0" border="0">
670
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_error_callback </td>
671
<td class="md" valign="top">( </td>
672
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
673
<td class="mdname" nowrap> <em>decoder</em>, </td>
678
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#a7">FLAC__StreamDecoderErrorCallback</a> </td>
679
<td class="mdname" nowrap> <em>value</em></td>
683
<td class="md">) </td>
684
<td class="md" colspan="2"></td>
691
<table cellspacing=5 cellpadding=0 border=0>
699
Set the error callback. The supplied function will be called whenever an error occurs during decoding.
703
The callback is mandatory and must be set before initialization.</dl><dl compact><dt><b>
704
Default Value:</b><dd>
705
<code>NULL</code> </dl><dl compact><dt><b>
707
<table border=0 cellspacing=2 cellpadding=0>
708
<tr><td valign=top><em>decoder</em> </td><td>
709
A decoder instance to set. </td></tr>
710
<tr><td valign=top><em>value</em> </td><td>
711
See above. </td></tr>
713
</dl><dl compact><dt><b>
715
<div class="fragment"><pre>decoder != NULL
716
</pre></div> <div class="fragment"><pre>value != NULL
717
</pre></div> </dl><dl compact><dt><b>
718
Return values: </b><dd>
719
<table border=0 cellspacing=2 cellpadding=0>
720
<tr><td valign=top><em>FLAC__bool</em> </td><td>
721
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
726
<a name="a14" doxytag="stream_decoder.h::FLAC__stream_decoder_set_client_data"></a><p>
727
<table width="100%" cellpadding="2" cellspacing="0" border="0">
730
<table cellpadding="0" cellspacing="0" border="0">
732
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_client_data </td>
733
<td class="md" valign="top">( </td>
734
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
735
<td class="mdname" nowrap> <em>decoder</em>, </td>
740
<td class="md" nowrap>void * </td>
741
<td class="mdname" nowrap> <em>value</em></td>
745
<td class="md">) </td>
746
<td class="md" colspan="2"></td>
753
<table cellspacing=5 cellpadding=0 border=0>
761
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>
762
Default Value:</b><dd>
763
<code>NULL</code> </dl><dl compact><dt><b>
765
<table border=0 cellspacing=2 cellpadding=0>
766
<tr><td valign=top><em>decoder</em> </td><td>
767
A decoder instance to set. </td></tr>
768
<tr><td valign=top><em>value</em> </td><td>
769
See above. </td></tr>
771
</dl><dl compact><dt><b>
773
<div class="fragment"><pre>decoder != NULL
774
</pre></div> </dl><dl compact><dt><b>
775
Return values: </b><dd>
776
<table border=0 cellspacing=2 cellpadding=0>
777
<tr><td valign=top><em>FLAC__bool</em> </td><td>
778
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
783
<a name="a15" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond"></a><p>
784
<table width="100%" cellpadding="2" cellspacing="0" border="0">
787
<table cellpadding="0" cellspacing="0" border="0">
789
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_respond </td>
790
<td class="md" valign="top">( </td>
791
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
792
<td class="mdname" nowrap> <em>decoder</em>, </td>
797
<td class="md" nowrap><a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> </td>
798
<td class="mdname" nowrap> <em>type</em></td>
802
<td class="md">) </td>
803
<td class="md" colspan="2"></td>
810
<table cellspacing=5 cellpadding=0 border=0>
818
Direct the decoder to pass on all metadata blocks of type <em>type</em>.<dl compact><dt><b>
819
Default Value:</b><dd>
820
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
822
<table border=0 cellspacing=2 cellpadding=0>
823
<tr><td valign=top><em>decoder</em> </td><td>
824
A decoder instance to set. </td></tr>
825
<tr><td valign=top><em>type</em> </td><td>
826
See above. </td></tr>
828
</dl><dl compact><dt><b>
830
<div class="fragment"><pre>decoder != NULL
831
</pre></div> <em>type</em> is valid </dl><dl compact><dt><b>
832
Return values: </b><dd>
833
<table border=0 cellspacing=2 cellpadding=0>
834
<tr><td valign=top><em>FLAC__bool</em> </td><td>
835
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
840
<a name="a16" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond_application"></a><p>
841
<table width="100%" cellpadding="2" cellspacing="0" border="0">
844
<table cellpadding="0" cellspacing="0" border="0">
846
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_respond_application </td>
847
<td class="md" valign="top">( </td>
848
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
849
<td class="mdname" nowrap> <em>decoder</em>, </td>
854
<td class="md" nowrap>const FLAC__byte </td>
855
<td class="mdname" nowrap> <em>id</em>[4]</td>
859
<td class="md">) </td>
860
<td class="md" colspan="2"></td>
867
<table cellspacing=5 cellpadding=0 border=0>
875
Direct the decoder to pass on all APPLICATION metadata blocks of the given <em>id</em>.<dl compact><dt><b>
876
Default Value:</b><dd>
877
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
879
<table border=0 cellspacing=2 cellpadding=0>
880
<tr><td valign=top><em>decoder</em> </td><td>
881
A decoder instance to set. </td></tr>
882
<tr><td valign=top><em>id</em> </td><td>
883
See above. </td></tr>
885
</dl><dl compact><dt><b>
887
<div class="fragment"><pre>decoder != NULL
888
</pre></div> <div class="fragment"><pre>id != NULL
889
</pre></div> </dl><dl compact><dt><b>
890
Return values: </b><dd>
891
<table border=0 cellspacing=2 cellpadding=0>
892
<tr><td valign=top><em>FLAC__bool</em> </td><td>
893
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
898
<a name="a17" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond_all"></a><p>
899
<table width="100%" cellpadding="2" cellspacing="0" border="0">
902
<table cellpadding="0" cellspacing="0" border="0">
904
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_respond_all </td>
905
<td class="md" valign="top">( </td>
906
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
907
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
908
<td class="md" valign="top">) </td>
909
<td class="md" nowrap></td>
916
<table cellspacing=5 cellpadding=0 border=0>
924
Direct the decoder to pass on all metadata blocks of any type.<dl compact><dt><b>
925
Default Value:</b><dd>
926
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
928
<table border=0 cellspacing=2 cellpadding=0>
929
<tr><td valign=top><em>decoder</em> </td><td>
930
A decoder instance to set. </td></tr>
932
</dl><dl compact><dt><b>
934
<div class="fragment"><pre>decoder != NULL
935
</pre></div> </dl><dl compact><dt><b>
936
Return values: </b><dd>
937
<table border=0 cellspacing=2 cellpadding=0>
938
<tr><td valign=top><em>FLAC__bool</em> </td><td>
939
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
944
<a name="a18" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore"></a><p>
945
<table width="100%" cellpadding="2" cellspacing="0" border="0">
948
<table cellpadding="0" cellspacing="0" border="0">
950
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_ignore </td>
951
<td class="md" valign="top">( </td>
952
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
953
<td class="mdname" nowrap> <em>decoder</em>, </td>
958
<td class="md" nowrap><a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> </td>
959
<td class="mdname" nowrap> <em>type</em></td>
963
<td class="md">) </td>
964
<td class="md" colspan="2"></td>
971
<table cellspacing=5 cellpadding=0 border=0>
979
Direct the decoder to filter out all metadata blocks of type <em>type</em>.<dl compact><dt><b>
980
Default Value:</b><dd>
981
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
983
<table border=0 cellspacing=2 cellpadding=0>
984
<tr><td valign=top><em>decoder</em> </td><td>
985
A decoder instance to set. </td></tr>
986
<tr><td valign=top><em>type</em> </td><td>
987
See above. </td></tr>
989
</dl><dl compact><dt><b>
991
<div class="fragment"><pre>decoder != NULL
992
</pre></div> <em>type</em> is valid </dl><dl compact><dt><b>
993
Return values: </b><dd>
994
<table border=0 cellspacing=2 cellpadding=0>
995
<tr><td valign=top><em>FLAC__bool</em> </td><td>
996
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1001
<a name="a19" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore_application"></a><p>
1002
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1005
<table cellpadding="0" cellspacing="0" border="0">
1007
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application </td>
1008
<td class="md" valign="top">( </td>
1009
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1010
<td class="mdname" nowrap> <em>decoder</em>, </td>
1015
<td class="md" nowrap>const FLAC__byte </td>
1016
<td class="mdname" nowrap> <em>id</em>[4]</td>
1020
<td class="md">) </td>
1021
<td class="md" colspan="2"></td>
1028
<table cellspacing=5 cellpadding=0 border=0>
1036
Direct the decoder to filter out all APPLICATION metadata blocks of the given <em>id</em>.<dl compact><dt><b>
1037
Default Value:</b><dd>
1038
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
1039
Parameters: </b><dd>
1040
<table border=0 cellspacing=2 cellpadding=0>
1041
<tr><td valign=top><em>decoder</em> </td><td>
1042
A decoder instance to set. </td></tr>
1043
<tr><td valign=top><em>id</em> </td><td>
1044
See above. </td></tr>
1046
</dl><dl compact><dt><b>
1048
<div class="fragment"><pre>decoder != NULL
1049
</pre></div> <div class="fragment"><pre>id != NULL
1050
</pre></div> </dl><dl compact><dt><b>
1051
Return values: </b><dd>
1052
<table border=0 cellspacing=2 cellpadding=0>
1053
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1054
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1059
<a name="a20" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore_all"></a><p>
1060
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1063
<table cellpadding="0" cellspacing="0" border="0">
1065
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all </td>
1066
<td class="md" valign="top">( </td>
1067
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1068
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1069
<td class="md" valign="top">) </td>
1070
<td class="md" nowrap></td>
1077
<table cellspacing=5 cellpadding=0 border=0>
1085
Direct the decoder to filter out all metadata blocks of any type.<dl compact><dt><b>
1086
Default Value:</b><dd>
1087
By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dl><dl compact><dt><b>
1088
Parameters: </b><dd>
1089
<table border=0 cellspacing=2 cellpadding=0>
1090
<tr><td valign=top><em>decoder</em> </td><td>
1091
A decoder instance to set. </td></tr>
1093
</dl><dl compact><dt><b>
1095
<div class="fragment"><pre>decoder != NULL
1096
</pre></div> </dl><dl compact><dt><b>
1097
Return values: </b><dd>
1098
<table border=0 cellspacing=2 cellpadding=0>
1099
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1100
<code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1105
<a name="a21" doxytag="stream_decoder.h::FLAC__stream_decoder_get_state"></a><p>
1106
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1109
<table cellpadding="0" cellspacing="0" border="0">
1111
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> FLAC__stream_decoder_get_state </td>
1112
<td class="md" valign="top">( </td>
1113
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1114
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1115
<td class="md" valign="top">) </td>
1116
<td class="md" nowrap></td>
1123
<table cellspacing=5 cellpadding=0 border=0>
1131
Get the current decoder state.<dl compact><dt><b>
1132
Parameters: </b><dd>
1133
<table border=0 cellspacing=2 cellpadding=0>
1134
<tr><td valign=top><em>decoder</em> </td><td>
1135
A decoder instance to query. </td></tr>
1137
</dl><dl compact><dt><b>
1139
<div class="fragment"><pre>decoder != NULL
1140
</pre></div> </dl><dl compact><dt><b>
1141
Return values: </b><dd>
1142
<table border=0 cellspacing=2 cellpadding=0>
1143
<tr><td valign=top><em>FLAC__StreamDecoderState</em> </td><td>
1144
The current decoder state. </td></tr>
1149
<a name="a22" doxytag="stream_decoder.h::FLAC__stream_decoder_get_resolved_state_string"></a><p>
1150
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1153
<table cellpadding="0" cellspacing="0" border="0">
1155
<td class="md" nowrap valign="top"> const char* FLAC__stream_decoder_get_resolved_state_string </td>
1156
<td class="md" valign="top">( </td>
1157
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1158
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1159
<td class="md" valign="top">) </td>
1160
<td class="md" nowrap></td>
1167
<table cellspacing=5 cellpadding=0 border=0>
1175
Get the current decoder state as a C string.<dl compact><dt><b>
1176
Parameters: </b><dd>
1177
<table border=0 cellspacing=2 cellpadding=0>
1178
<tr><td valign=top><em>decoder</em> </td><td>
1179
A decoder instance to query. </td></tr>
1181
</dl><dl compact><dt><b>
1183
<div class="fragment"><pre>decoder != NULL
1184
</pre></div> </dl><dl compact><dt><b>
1185
Return values: </b><dd>
1186
<table border=0 cellspacing=2 cellpadding=0>
1187
<tr><td valign=top><em>const</em> </td><td>
1188
char * The decoder state as a C string. Do not modify the contents. </td></tr>
1193
<a name="a23" doxytag="stream_decoder.h::FLAC__stream_decoder_get_channels"></a><p>
1194
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1197
<table cellpadding="0" cellspacing="0" border="0">
1199
<td class="md" nowrap valign="top"> unsigned FLAC__stream_decoder_get_channels </td>
1200
<td class="md" valign="top">( </td>
1201
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1202
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1203
<td class="md" valign="top">) </td>
1204
<td class="md" nowrap></td>
1211
<table cellspacing=5 cellpadding=0 border=0>
1219
Get the current number of channels in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<dl compact><dt><b>
1220
Parameters: </b><dd>
1221
<table border=0 cellspacing=2 cellpadding=0>
1222
<tr><td valign=top><em>decoder</em> </td><td>
1223
A decoder instance to query. </td></tr>
1225
</dl><dl compact><dt><b>
1227
<div class="fragment"><pre>decoder != NULL
1228
</pre></div> </dl><dl compact><dt><b>
1229
Return values: </b><dd>
1230
<table border=0 cellspacing=2 cellpadding=0>
1231
<tr><td valign=top><em>unsigned</em> </td><td>
1232
See above. </td></tr>
1237
<a name="a24" doxytag="stream_decoder.h::FLAC__stream_decoder_get_channel_assignment"></a><p>
1238
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1241
<table cellpadding="0" cellspacing="0" border="0">
1243
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__format.html#a95">FLAC__ChannelAssignment</a> FLAC__stream_decoder_get_channel_assignment </td>
1244
<td class="md" valign="top">( </td>
1245
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1246
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1247
<td class="md" valign="top">) </td>
1248
<td class="md" nowrap></td>
1255
<table cellspacing=5 cellpadding=0 border=0>
1263
Get the current channel assignment in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<dl compact><dt><b>
1264
Parameters: </b><dd>
1265
<table border=0 cellspacing=2 cellpadding=0>
1266
<tr><td valign=top><em>decoder</em> </td><td>
1267
A decoder instance to query. </td></tr>
1269
</dl><dl compact><dt><b>
1271
<div class="fragment"><pre>decoder != NULL
1272
</pre></div> </dl><dl compact><dt><b>
1273
Return values: </b><dd>
1274
<table border=0 cellspacing=2 cellpadding=0>
1275
<tr><td valign=top><em>FLAC__ChannelAssignment</em> </td><td>
1276
See above. </td></tr>
1281
<a name="a25" doxytag="stream_decoder.h::FLAC__stream_decoder_get_bits_per_sample"></a><p>
1282
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1285
<table cellpadding="0" cellspacing="0" border="0">
1287
<td class="md" nowrap valign="top"> unsigned FLAC__stream_decoder_get_bits_per_sample </td>
1288
<td class="md" valign="top">( </td>
1289
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1290
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1291
<td class="md" valign="top">) </td>
1292
<td class="md" nowrap></td>
1299
<table cellspacing=5 cellpadding=0 border=0>
1307
Get the current sample resolution in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<dl compact><dt><b>
1308
Parameters: </b><dd>
1309
<table border=0 cellspacing=2 cellpadding=0>
1310
<tr><td valign=top><em>decoder</em> </td><td>
1311
A decoder instance to query. </td></tr>
1313
</dl><dl compact><dt><b>
1315
<div class="fragment"><pre>decoder != NULL
1316
</pre></div> </dl><dl compact><dt><b>
1317
Return values: </b><dd>
1318
<table border=0 cellspacing=2 cellpadding=0>
1319
<tr><td valign=top><em>unsigned</em> </td><td>
1320
See above. </td></tr>
1325
<a name="a26" doxytag="stream_decoder.h::FLAC__stream_decoder_get_sample_rate"></a><p>
1326
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1329
<table cellpadding="0" cellspacing="0" border="0">
1331
<td class="md" nowrap valign="top"> unsigned FLAC__stream_decoder_get_sample_rate </td>
1332
<td class="md" valign="top">( </td>
1333
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1334
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1335
<td class="md" valign="top">) </td>
1336
<td class="md" nowrap></td>
1343
<table cellspacing=5 cellpadding=0 border=0>
1351
Get the current sample rate in Hz of the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<dl compact><dt><b>
1352
Parameters: </b><dd>
1353
<table border=0 cellspacing=2 cellpadding=0>
1354
<tr><td valign=top><em>decoder</em> </td><td>
1355
A decoder instance to query. </td></tr>
1357
</dl><dl compact><dt><b>
1359
<div class="fragment"><pre>decoder != NULL
1360
</pre></div> </dl><dl compact><dt><b>
1361
Return values: </b><dd>
1362
<table border=0 cellspacing=2 cellpadding=0>
1363
<tr><td valign=top><em>unsigned</em> </td><td>
1364
See above. </td></tr>
1369
<a name="a27" doxytag="stream_decoder.h::FLAC__stream_decoder_get_blocksize"></a><p>
1370
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1373
<table cellpadding="0" cellspacing="0" border="0">
1375
<td class="md" nowrap valign="top"> unsigned FLAC__stream_decoder_get_blocksize </td>
1376
<td class="md" valign="top">( </td>
1377
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1378
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1379
<td class="md" valign="top">) </td>
1380
<td class="md" nowrap></td>
1387
<table cellspacing=5 cellpadding=0 border=0>
1395
Get the current blocksize of the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<dl compact><dt><b>
1396
Parameters: </b><dd>
1397
<table border=0 cellspacing=2 cellpadding=0>
1398
<tr><td valign=top><em>decoder</em> </td><td>
1399
A decoder instance to query. </td></tr>
1401
</dl><dl compact><dt><b>
1403
<div class="fragment"><pre>decoder != NULL
1404
</pre></div> </dl><dl compact><dt><b>
1405
Return values: </b><dd>
1406
<table border=0 cellspacing=2 cellpadding=0>
1407
<tr><td valign=top><em>unsigned</em> </td><td>
1408
See above. </td></tr>
1413
<a name="a28" doxytag="stream_decoder.h::FLAC__stream_decoder_init"></a><p>
1414
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1417
<table cellpadding="0" cellspacing="0" border="0">
1419
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__stream__decoder.html#a36">FLAC__StreamDecoderState</a> FLAC__stream_decoder_init </td>
1420
<td class="md" valign="top">( </td>
1421
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1422
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1423
<td class="md" valign="top">) </td>
1424
<td class="md" nowrap></td>
1431
<table cellspacing=5 cellpadding=0 border=0>
1439
Initialize the decoder instance. Should be called after <a class="el" href="group__flac__stream__decoder.html#a8">FLAC__stream_decoder_new</a>() and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<dl compact><dt><b>
1440
Parameters: </b><dd>
1441
<table border=0 cellspacing=2 cellpadding=0>
1442
<tr><td valign=top><em>decoder</em> </td><td>
1443
An uninitialized decoder instance. </td></tr>
1445
</dl><dl compact><dt><b>
1447
<div class="fragment"><pre>decoder != NULL
1448
</pre></div> </dl><dl compact><dt><b>
1449
Return values: </b><dd>
1450
<table border=0 cellspacing=2 cellpadding=0>
1451
<tr><td valign=top><em>FLAC__StreamDecoderState</em> </td><td>
1452
<code>FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</code> if initialization was successful; see FLAC__StreamDecoderState for the meanings of other return values. </td></tr>
1457
<a name="a29" doxytag="stream_decoder.h::FLAC__stream_decoder_finish"></a><p>
1458
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1461
<table cellpadding="0" cellspacing="0" border="0">
1463
<td class="md" nowrap valign="top"> void FLAC__stream_decoder_finish </td>
1464
<td class="md" valign="top">( </td>
1465
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1466
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1467
<td class="md" valign="top">) </td>
1468
<td class="md" nowrap></td>
1475
<table cellspacing=5 cellpadding=0 border=0>
1483
Finish the decoding process. Flushes the decoding buffer, releases resources, resets the decoder settings to their defaults, and returns the decoder state to FLAC__STREAM_DECODER_UNINITIALIZED.
1485
In the event of a prematurely-terminated decode, it is not strictly necessary to call this immediately before <a class="el" href="group__flac__stream__decoder.html#a9">FLAC__stream_decoder_delete</a>() but it is good practice to match every <a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a>() with a <a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>().<dl compact><dt><b>
1486
Parameters: </b><dd>
1487
<table border=0 cellspacing=2 cellpadding=0>
1488
<tr><td valign=top><em>decoder</em> </td><td>
1489
An uninitialized decoder instance. </td></tr>
1491
</dl><dl compact><dt><b>
1493
<div class="fragment"><pre>decoder != NULL
1494
</pre></div> </dl> </td>
1497
<a name="a30" doxytag="stream_decoder.h::FLAC__stream_decoder_flush"></a><p>
1498
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1501
<table cellpadding="0" cellspacing="0" border="0">
1503
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_flush </td>
1504
<td class="md" valign="top">( </td>
1505
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1506
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1507
<td class="md" valign="top">) </td>
1508
<td class="md" nowrap></td>
1515
<table cellspacing=5 cellpadding=0 border=0>
1523
Flush the stream input. The decoder's input buffer will be cleared and the state set to <code>FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC</code>.<dl compact><dt><b>
1524
Parameters: </b><dd>
1525
<table border=0 cellspacing=2 cellpadding=0>
1526
<tr><td valign=top><em>decoder</em> </td><td>
1527
A decoder instance. </td></tr>
1529
</dl><dl compact><dt><b>
1531
<div class="fragment"><pre>decoder != NULL
1532
</pre></div> </dl><dl compact><dt><b>
1533
Return values: </b><dd>
1534
<table border=0 cellspacing=2 cellpadding=0>
1535
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1536
<code>true</code> if successful, else <code>false</code> if a memory allocation error occurs. </td></tr>
1541
<a name="a31" doxytag="stream_decoder.h::FLAC__stream_decoder_reset"></a><p>
1542
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1545
<table cellpadding="0" cellspacing="0" border="0">
1547
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_reset </td>
1548
<td class="md" valign="top">( </td>
1549
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1550
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1551
<td class="md" valign="top">) </td>
1552
<td class="md" nowrap></td>
1559
<table cellspacing=5 cellpadding=0 border=0>
1567
Reset the decoding process. The decoder's input buffer will be cleared and the state set to <code>FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</code>. This is similar to <a class="el" href="group__flac__stream__decoder.html#a29">FLAC__stream_decoder_finish</a>() except that the settings are preserved; there is no need to call <a class="el" href="group__flac__stream__decoder.html#a28">FLAC__stream_decoder_init</a>() before decoding again.<dl compact><dt><b>
1568
Parameters: </b><dd>
1569
<table border=0 cellspacing=2 cellpadding=0>
1570
<tr><td valign=top><em>decoder</em> </td><td>
1571
A decoder instance. </td></tr>
1573
</dl><dl compact><dt><b>
1575
<div class="fragment"><pre>decoder != NULL
1576
</pre></div> </dl><dl compact><dt><b>
1577
Return values: </b><dd>
1578
<table border=0 cellspacing=2 cellpadding=0>
1579
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1580
<code>true</code> if successful, else <code>false</code> if a memory allocation error occurs. </td></tr>
1585
<a name="a32" doxytag="stream_decoder.h::FLAC__stream_decoder_process_single"></a><p>
1586
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1589
<table cellpadding="0" cellspacing="0" border="0">
1591
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_process_single </td>
1592
<td class="md" valign="top">( </td>
1593
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1594
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1595
<td class="md" valign="top">) </td>
1596
<td class="md" nowrap></td>
1603
<table cellspacing=5 cellpadding=0 border=0>
1611
Decode one metadata block or audio frame. This version instructs the decoder to decode a either a single metadata block or a single frame and stop, unless the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.
1613
As the decoder needs more input it will call the read callback. Depending on what was decoded, the metadata or write callback will be called with the decoded metadata block or audio frame, unless an error occurred. If the decoder loses sync it will call the error callback instead.
1615
Unless there is a fatal read error or end of stream, this function will return once one whole frame is decoded. In other words, if the stream is not synchronized or points to a corrupt frame header, the decoder will continue to try and resync until it gets to a valid frame, then decode one frame, then return. If the decoder points to frame whose frame CRC in the frame footer does not match the computed frame CRC, this function will issue a FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH error to the error callback, and return, having decoded one complete, although corrupt, frame. (Such corrupted frames are sent as silence of the correct length to the write callback.)<dl compact><dt><b>
1616
Parameters: </b><dd>
1617
<table border=0 cellspacing=2 cellpadding=0>
1618
<tr><td valign=top><em>decoder</em> </td><td>
1619
An initialized decoder instance. </td></tr>
1621
</dl><dl compact><dt><b>
1623
<div class="fragment"><pre>decoder != NULL
1624
</pre></div> </dl><dl compact><dt><b>
1625
Return values: </b><dd>
1626
<table border=0 cellspacing=2 cellpadding=0>
1627
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1628
<code>false</code> if any read or write error occurred (except <code>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)</code>, else <code>true</code>; in any case, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#a21">FLAC__stream_decoder_get_state</a>() to see what went wrong or to check for lost synchronization (a sign of stream corruption). </td></tr>
1633
<a name="a33" doxytag="stream_decoder.h::FLAC__stream_decoder_process_until_end_of_metadata"></a><p>
1634
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1637
<table cellpadding="0" cellspacing="0" border="0">
1639
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata </td>
1640
<td class="md" valign="top">( </td>
1641
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1642
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1643
<td class="md" valign="top">) </td>
1644
<td class="md" nowrap></td>
1651
<table cellspacing=5 cellpadding=0 border=0>
1659
Decode until the end of the metadata. This version instructs the decoder to decode from the current position and continue until all the metadata has been read, or until the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.
1661
As the decoder needs more input it will call the read callback. As each metadata block is decoded, the metadata callback will be called with the decoded metadata. If the decoder loses sync it will call the error callback.<dl compact><dt><b>
1662
Parameters: </b><dd>
1663
<table border=0 cellspacing=2 cellpadding=0>
1664
<tr><td valign=top><em>decoder</em> </td><td>
1665
An initialized decoder instance. </td></tr>
1667
</dl><dl compact><dt><b>
1669
<div class="fragment"><pre>decoder != NULL
1670
</pre></div> </dl><dl compact><dt><b>
1671
Return values: </b><dd>
1672
<table border=0 cellspacing=2 cellpadding=0>
1673
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1674
<code>false</code> if any read or write error occurred (except <code>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)</code>, else <code>true</code>; in any case, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#a21">FLAC__stream_decoder_get_state</a>() to see what went wrong or to check for lost synchronization (a sign of stream corruption). </td></tr>
1679
<a name="a34" doxytag="stream_decoder.h::FLAC__stream_decoder_process_until_end_of_stream"></a><p>
1680
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1683
<table cellpadding="0" cellspacing="0" border="0">
1685
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_process_until_end_of_stream </td>
1686
<td class="md" valign="top">( </td>
1687
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1688
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1689
<td class="md" valign="top">) </td>
1690
<td class="md" nowrap></td>
1697
<table cellspacing=5 cellpadding=0 border=0>
1705
Decode until the end of the stream. This version instructs the decoder to decode from the current position and continue until the end of stream (the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM)</code>, or until the callbacks return a fatal error.
1707
As the decoder needs more input it will call the read callback. As each metadata block and frame is decoded, the metadata or write callback will be called with the decoded metadata or frame. If the decoder loses sync it will call the error callback.<dl compact><dt><b>
1708
Parameters: </b><dd>
1709
<table border=0 cellspacing=2 cellpadding=0>
1710
<tr><td valign=top><em>decoder</em> </td><td>
1711
An initialized decoder instance. </td></tr>
1713
</dl><dl compact><dt><b>
1715
<div class="fragment"><pre>decoder != NULL
1716
</pre></div> </dl><dl compact><dt><b>
1717
Return values: </b><dd>
1718
<table border=0 cellspacing=2 cellpadding=0>
1719
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1720
<code>false</code> if any read or write error occurred (except <code>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)</code>, else <code>true</code>; in any case, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#a21">FLAC__stream_decoder_get_state</a>() to see what went wrong or to check for lost synchronization (a sign of stream corruption). </td></tr>
1725
<a name="a35" doxytag="stream_decoder.h::FLAC__stream_decoder_skip_single_frame"></a><p>
1726
<table width="100%" cellpadding="2" cellspacing="0" border="0">
1729
<table cellpadding="0" cellspacing="0" border="0">
1731
<td class="md" nowrap valign="top"> FLAC__bool FLAC__stream_decoder_skip_single_frame </td>
1732
<td class="md" valign="top">( </td>
1733
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1734
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1735
<td class="md" valign="top">) </td>
1736
<td class="md" nowrap></td>
1743
<table cellspacing=5 cellpadding=0 border=0>
1751
Skip one audio frame. This version instructs the decoder to 'skip' a single frame and stop, unless the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.
1753
The decoding flow is the same as what occurs when <a class="el" href="group__flac__stream__decoder.html#a32">FLAC__stream_decoder_process_single</a>() is called to process an audio frame, except that this function does not decode the parsed data into PCM or call the write callback. The integrity of the frame is still checked the same way as in the other process functions.
1755
This function will return once one whole frame is skipped, in the same way that <a class="el" href="group__flac__stream__decoder.html#a32">FLAC__stream_decoder_process_single</a>() will return once one whole frame is decoded.
1757
This function, when used from the higher <a class="el" href="structFLAC____SeekableStreamDecoder.html">FLAC__SeekableStreamDecoder</a> layer, can be used in more quickly determining FLAC frame boundaries when decoding of the actual data is not needed, for example when an application is separating a FLAC stream into frames for editing or storing in a container. To do this, the application can use <a class="el" href="group__flac__seekable__stream__decoder.html#a48">FLAC__seekable_stream_decoder_skip_single_frame</a>() to quickly advance to the next frame, then use <a class="el" href="group__flac__seekable__stream__decoder.html#a40">FLAC__seekable_stream_decoder_get_decode_position</a>() to find the new frame boundary.
1759
This function should only be called when the stream has advanced past all the metadata, otherwise it will return <code>false</code>.<dl compact><dt><b>
1760
Parameters: </b><dd>
1761
<table border=0 cellspacing=2 cellpadding=0>
1762
<tr><td valign=top><em>decoder</em> </td><td>
1763
An initialized decoder instance not in a metadata state. </td></tr>
1765
</dl><dl compact><dt><b>
1767
<div class="fragment"><pre>decoder != NULL
1768
</pre></div> </dl><dl compact><dt><b>
1769
Return values: </b><dd>
1770
<table border=0 cellspacing=2 cellpadding=0>
1771
<tr><td valign=top><em>FLAC__bool</em> </td><td>
1772
<code>false</code> if any read or write error occurred (except <code>FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)</code>, or if the decoder is in the FLAC__STREAM_DECODER_SEARCH_FOR_METADATA or FLAC__STREAM_DECODER_READ_METADATA state, else <code>true</code>; in any case, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#a21">FLAC__stream_decoder_get_state</a>() to see what went wrong or to check for lost synchronization (a sign of stream corruption). </td></tr>
850
<a class="anchor" name="ga16" doxytag="stream_decoder.h::FLAC__stream_decoder_new"></a><p>
851
<table class="mdTable" cellpadding="2" cellspacing="0">
854
<table cellpadding="0" cellspacing="0" border="0">
856
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a>* FLAC__stream_decoder_new </td>
857
<td class="md" valign="top">( </td>
858
<td class="md" nowrap valign="top">void </td>
859
<td class="mdname1" valign="top" nowrap> </td>
860
<td class="md" valign="top"> ) </td>
861
<td class="md" nowrap></td>
867
<table cellspacing="5" cellpadding="0" border="0">
875
Create a new stream decoder instance. The instance is created with default settings; see the individual FLAC__stream_decoder_set_*() functions for each setting's default.<p>
876
<dl compact><dt><b>Return values:</b></dt><dd>
877
<table border="0" cellspacing="2" cellpadding="0">
878
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoder*</em> </td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
884
<a class="anchor" name="ga17" doxytag="stream_decoder.h::FLAC__stream_decoder_delete"></a><p>
885
<table class="mdTable" cellpadding="2" cellspacing="0">
888
<table cellpadding="0" cellspacing="0" border="0">
890
<td class="md" nowrap valign="top">void FLAC__stream_decoder_delete </td>
891
<td class="md" valign="top">( </td>
892
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
893
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
894
<td class="md" valign="top"> ) </td>
895
<td class="md" nowrap></td>
901
<table cellspacing="5" cellpadding="0" border="0">
909
Free a decoder instance. Deletes the object pointed to by <em>decoder</em>.<p>
910
<dl compact><dt><b>Parameters:</b></dt><dd>
911
<table border="0" cellspacing="2" cellpadding="0">
912
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A pointer to an existing decoder. </td></tr>
915
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
916
</pre></div> </dd></dl>
920
<a class="anchor" name="ga18" doxytag="stream_decoder.h::FLAC__stream_decoder_set_ogg_serial_number"></a><p>
921
<table class="mdTable" cellpadding="2" cellspacing="0">
924
<table cellpadding="0" cellspacing="0" border="0">
926
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_ogg_serial_number </td>
927
<td class="md" valign="top">( </td>
928
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
929
<td class="mdname" nowrap> <em>decoder</em>, </td>
932
<td class="md" nowrap align="right"></td>
934
<td class="md" nowrap>long </td>
935
<td class="mdname" nowrap> <em>serial_number</em></td>
939
<td class="md">) </td>
940
<td class="md" colspan="2"></td>
946
<table cellspacing="5" cellpadding="0" border="0">
954
Set the serial number for the FLAC stream within the Ogg container. The default behavior is to use the serial number of the first Ogg page. Setting a serial number here will explicitly specify which stream is to be decoded.<p>
955
<dl compact><dt><b>Note:</b></dt><dd>This does not need to be set for native FLAC decoding.</dd></dl>
956
<dl compact><dt><b>Default Value:</b></dt><dd><code>use</code> serial number of first page </dd></dl>
957
<dl compact><dt><b>Parameters:</b></dt><dd>
958
<table border="0" cellspacing="2" cellpadding="0">
959
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
960
<tr><td valign="top"></td><td valign="top"><em>serial_number</em> </td><td>See above. </td></tr>
963
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
964
</pre></div> </dd></dl>
965
<dl compact><dt><b>Return values:</b></dt><dd>
966
<table border="0" cellspacing="2" cellpadding="0">
967
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
973
<a class="anchor" name="ga19" doxytag="stream_decoder.h::FLAC__stream_decoder_set_md5_checking"></a><p>
974
<table class="mdTable" cellpadding="2" cellspacing="0">
977
<table cellpadding="0" cellspacing="0" border="0">
979
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_md5_checking </td>
980
<td class="md" valign="top">( </td>
981
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
982
<td class="mdname" nowrap> <em>decoder</em>, </td>
985
<td class="md" nowrap align="right"></td>
987
<td class="md" nowrap>FLAC__bool </td>
988
<td class="mdname" nowrap> <em>value</em></td>
992
<td class="md">) </td>
993
<td class="md" colspan="2"></td>
999
<table cellspacing="5" cellpadding="0" border="0">
1007
Set the "MD5 signature checking" flag. If <code>true</code>, the decoder will compute the MD5 signature of the unencoded audio data while decoding and compare it to the signature from the STREAMINFO block, if it exists, during <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a>.<p>
1008
MD5 signature checking will be turned off (until the next <a class="el" href="group__flac__stream__decoder.html#ga44">FLAC__stream_decoder_reset()</a>) if there is no signature in the STREAMINFO block or when a seek is attempted.<p>
1009
Clients that do not use the MD5 check should leave this off to speed up decoding.<p>
1010
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
1011
<dl compact><dt><b>Parameters:</b></dt><dd>
1012
<table border="0" cellspacing="2" cellpadding="0">
1013
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1014
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Flag value (see above). </td></tr>
1017
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1018
</pre></div> </dd></dl>
1019
<dl compact><dt><b>Return values:</b></dt><dd>
1020
<table border="0" cellspacing="2" cellpadding="0">
1021
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1027
<a class="anchor" name="ga20" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond"></a><p>
1028
<table class="mdTable" cellpadding="2" cellspacing="0">
1031
<table cellpadding="0" cellspacing="0" border="0">
1033
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond </td>
1034
<td class="md" valign="top">( </td>
1035
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1036
<td class="mdname" nowrap> <em>decoder</em>, </td>
1039
<td class="md" nowrap align="right"></td>
1040
<td class="md"></td>
1041
<td class="md" nowrap><a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> </td>
1042
<td class="mdname" nowrap> <em>type</em></td>
1045
<td class="md"></td>
1046
<td class="md">) </td>
1047
<td class="md" colspan="2"></td>
1053
<table cellspacing="5" cellpadding="0" border="0">
1061
Direct the decoder to pass on all metadata blocks of type <em>type</em>.<p>
1062
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1063
<dl compact><dt><b>Parameters:</b></dt><dd>
1064
<table border="0" cellspacing="2" cellpadding="0">
1065
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1066
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>See above. </td></tr>
1069
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1070
</pre></div> <em>type</em> is valid </dd></dl>
1071
<dl compact><dt><b>Return values:</b></dt><dd>
1072
<table border="0" cellspacing="2" cellpadding="0">
1073
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1079
<a class="anchor" name="ga21" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond_application"></a><p>
1080
<table class="mdTable" cellpadding="2" cellspacing="0">
1083
<table cellpadding="0" cellspacing="0" border="0">
1085
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond_application </td>
1086
<td class="md" valign="top">( </td>
1087
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1088
<td class="mdname" nowrap> <em>decoder</em>, </td>
1091
<td class="md" nowrap align="right"></td>
1092
<td class="md"></td>
1093
<td class="md" nowrap>const FLAC__byte </td>
1094
<td class="mdname" nowrap> <em>id</em>[4]</td>
1097
<td class="md"></td>
1098
<td class="md">) </td>
1099
<td class="md" colspan="2"></td>
1105
<table cellspacing="5" cellpadding="0" border="0">
1113
Direct the decoder to pass on all APPLICATION metadata blocks of the given <em>id</em>.<p>
1114
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1115
<dl compact><dt><b>Parameters:</b></dt><dd>
1116
<table border="0" cellspacing="2" cellpadding="0">
1117
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1118
<tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>See above. </td></tr>
1121
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1122
</pre></div> <div class="fragment"><pre class="fragment"> <span class="keywordtype">id</span> != NULL
1123
</pre></div> </dd></dl>
1124
<dl compact><dt><b>Return values:</b></dt><dd>
1125
<table border="0" cellspacing="2" cellpadding="0">
1126
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1132
<a class="anchor" name="ga22" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_respond_all"></a><p>
1133
<table class="mdTable" cellpadding="2" cellspacing="0">
1136
<table cellpadding="0" cellspacing="0" border="0">
1138
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond_all </td>
1139
<td class="md" valign="top">( </td>
1140
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1141
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1142
<td class="md" valign="top"> ) </td>
1143
<td class="md" nowrap></td>
1149
<table cellspacing="5" cellpadding="0" border="0">
1157
Direct the decoder to pass on all metadata blocks of any type.<p>
1158
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1159
<dl compact><dt><b>Parameters:</b></dt><dd>
1160
<table border="0" cellspacing="2" cellpadding="0">
1161
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1164
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1165
</pre></div> </dd></dl>
1166
<dl compact><dt><b>Return values:</b></dt><dd>
1167
<table border="0" cellspacing="2" cellpadding="0">
1168
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1174
<a class="anchor" name="ga23" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore"></a><p>
1175
<table class="mdTable" cellpadding="2" cellspacing="0">
1178
<table cellpadding="0" cellspacing="0" border="0">
1180
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore </td>
1181
<td class="md" valign="top">( </td>
1182
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1183
<td class="mdname" nowrap> <em>decoder</em>, </td>
1186
<td class="md" nowrap align="right"></td>
1187
<td class="md"></td>
1188
<td class="md" nowrap><a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> </td>
1189
<td class="mdname" nowrap> <em>type</em></td>
1192
<td class="md"></td>
1193
<td class="md">) </td>
1194
<td class="md" colspan="2"></td>
1200
<table cellspacing="5" cellpadding="0" border="0">
1208
Direct the decoder to filter out all metadata blocks of type <em>type</em>.<p>
1209
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1210
<dl compact><dt><b>Parameters:</b></dt><dd>
1211
<table border="0" cellspacing="2" cellpadding="0">
1212
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1213
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>See above. </td></tr>
1216
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1217
</pre></div> <em>type</em> is valid </dd></dl>
1218
<dl compact><dt><b>Return values:</b></dt><dd>
1219
<table border="0" cellspacing="2" cellpadding="0">
1220
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1226
<a class="anchor" name="ga24" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore_application"></a><p>
1227
<table class="mdTable" cellpadding="2" cellspacing="0">
1230
<table cellpadding="0" cellspacing="0" border="0">
1232
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application </td>
1233
<td class="md" valign="top">( </td>
1234
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1235
<td class="mdname" nowrap> <em>decoder</em>, </td>
1238
<td class="md" nowrap align="right"></td>
1239
<td class="md"></td>
1240
<td class="md" nowrap>const FLAC__byte </td>
1241
<td class="mdname" nowrap> <em>id</em>[4]</td>
1244
<td class="md"></td>
1245
<td class="md">) </td>
1246
<td class="md" colspan="2"></td>
1252
<table cellspacing="5" cellpadding="0" border="0">
1260
Direct the decoder to filter out all APPLICATION metadata blocks of the given <em>id</em>.<p>
1261
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1262
<dl compact><dt><b>Parameters:</b></dt><dd>
1263
<table border="0" cellspacing="2" cellpadding="0">
1264
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1265
<tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>See above. </td></tr>
1268
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1269
</pre></div> <div class="fragment"><pre class="fragment"> <span class="keywordtype">id</span> != NULL
1270
</pre></div> </dd></dl>
1271
<dl compact><dt><b>Return values:</b></dt><dd>
1272
<table border="0" cellspacing="2" cellpadding="0">
1273
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1279
<a class="anchor" name="ga25" doxytag="stream_decoder.h::FLAC__stream_decoder_set_metadata_ignore_all"></a><p>
1280
<table class="mdTable" cellpadding="2" cellspacing="0">
1283
<table cellpadding="0" cellspacing="0" border="0">
1285
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all </td>
1286
<td class="md" valign="top">( </td>
1287
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1288
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1289
<td class="md" valign="top"> ) </td>
1290
<td class="md" nowrap></td>
1296
<table cellspacing="5" cellpadding="0" border="0">
1304
Direct the decoder to filter out all metadata blocks of any type.<p>
1305
<dl compact><dt><b>Default Value:</b></dt><dd>By default, only the <code>STREAMINFO</code> block is returned via the metadata callback. </dd></dl>
1306
<dl compact><dt><b>Parameters:</b></dt><dd>
1307
<table border="0" cellspacing="2" cellpadding="0">
1308
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to set. </td></tr>
1311
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1312
</pre></div> </dd></dl>
1313
<dl compact><dt><b>Return values:</b></dt><dd>
1314
<table border="0" cellspacing="2" cellpadding="0">
1315
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1321
<a class="anchor" name="ga26" doxytag="stream_decoder.h::FLAC__stream_decoder_get_state"></a><p>
1322
<table class="mdTable" cellpadding="2" cellspacing="0">
1325
<table cellpadding="0" cellspacing="0" border="0">
1327
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> FLAC__stream_decoder_get_state </td>
1328
<td class="md" valign="top">( </td>
1329
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1330
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1331
<td class="md" valign="top"> ) </td>
1332
<td class="md" nowrap></td>
1338
<table cellspacing="5" cellpadding="0" border="0">
1346
Get the current decoder state.<p>
1347
<dl compact><dt><b>Parameters:</b></dt><dd>
1348
<table border="0" cellspacing="2" cellpadding="0">
1349
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1352
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1353
</pre></div> </dd></dl>
1354
<dl compact><dt><b>Return values:</b></dt><dd>
1355
<table border="0" cellspacing="2" cellpadding="0">
1356
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderState</em> </td><td>The current decoder state. </td></tr>
1362
<a class="anchor" name="ga27" doxytag="stream_decoder.h::FLAC__stream_decoder_get_resolved_state_string"></a><p>
1363
<table class="mdTable" cellpadding="2" cellspacing="0">
1366
<table cellpadding="0" cellspacing="0" border="0">
1368
<td class="md" nowrap valign="top">const char* FLAC__stream_decoder_get_resolved_state_string </td>
1369
<td class="md" valign="top">( </td>
1370
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1371
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1372
<td class="md" valign="top"> ) </td>
1373
<td class="md" nowrap></td>
1379
<table cellspacing="5" cellpadding="0" border="0">
1387
Get the current decoder state as a C string.<p>
1388
<dl compact><dt><b>Parameters:</b></dt><dd>
1389
<table border="0" cellspacing="2" cellpadding="0">
1390
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1393
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1394
</pre></div> </dd></dl>
1395
<dl compact><dt><b>Return values:</b></dt><dd>
1396
<table border="0" cellspacing="2" cellpadding="0">
1397
<tr><td valign="top"></td><td valign="top"><em>const</em> </td><td>char * The decoder state as a C string. Do not modify the contents. </td></tr>
1403
<a class="anchor" name="ga28" doxytag="stream_decoder.h::FLAC__stream_decoder_get_md5_checking"></a><p>
1404
<table class="mdTable" cellpadding="2" cellspacing="0">
1407
<table cellpadding="0" cellspacing="0" border="0">
1409
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_get_md5_checking </td>
1410
<td class="md" valign="top">( </td>
1411
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1412
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1413
<td class="md" valign="top"> ) </td>
1414
<td class="md" nowrap></td>
1420
<table cellspacing="5" cellpadding="0" border="0">
1428
Get the "MD5 signature checking" flag. This is the value of the setting, not whether or not the decoder is currently checking the MD5 (remember, it can be turned off automatically by a seek). When the decoder is reset the flag will be restored to the value returned by this function.<p>
1429
<dl compact><dt><b>Parameters:</b></dt><dd>
1430
<table border="0" cellspacing="2" cellpadding="0">
1431
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1434
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1435
</pre></div> </dd></dl>
1436
<dl compact><dt><b>Return values:</b></dt><dd>
1437
<table border="0" cellspacing="2" cellpadding="0">
1438
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See above. </td></tr>
1444
<a class="anchor" name="ga29" doxytag="stream_decoder.h::FLAC__stream_decoder_get_total_samples"></a><p>
1445
<table class="mdTable" cellpadding="2" cellspacing="0">
1448
<table cellpadding="0" cellspacing="0" border="0">
1450
<td class="md" nowrap valign="top">FLAC__uint64 FLAC__stream_decoder_get_total_samples </td>
1451
<td class="md" valign="top">( </td>
1452
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1453
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1454
<td class="md" valign="top"> ) </td>
1455
<td class="md" nowrap></td>
1461
<table cellspacing="5" cellpadding="0" border="0">
1469
Get the total number of samples in the stream being decoded. Will only be valid after decoding has started and will contain the value from the <code>STREAMINFO</code> block. A value of <code>0</code> means "unknown".<p>
1470
<dl compact><dt><b>Parameters:</b></dt><dd>
1471
<table border="0" cellspacing="2" cellpadding="0">
1472
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1475
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1476
</pre></div> </dd></dl>
1477
<dl compact><dt><b>Return values:</b></dt><dd>
1478
<table border="0" cellspacing="2" cellpadding="0">
1479
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See above. </td></tr>
1485
<a class="anchor" name="ga30" doxytag="stream_decoder.h::FLAC__stream_decoder_get_channels"></a><p>
1486
<table class="mdTable" cellpadding="2" cellspacing="0">
1489
<table cellpadding="0" cellspacing="0" border="0">
1491
<td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_channels </td>
1492
<td class="md" valign="top">( </td>
1493
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1494
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1495
<td class="md" valign="top"> ) </td>
1496
<td class="md" nowrap></td>
1502
<table cellspacing="5" cellpadding="0" border="0">
1510
Get the current number of channels in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<p>
1511
<dl compact><dt><b>Parameters:</b></dt><dd>
1512
<table border="0" cellspacing="2" cellpadding="0">
1513
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1516
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1517
</pre></div> </dd></dl>
1518
<dl compact><dt><b>Return values:</b></dt><dd>
1519
<table border="0" cellspacing="2" cellpadding="0">
1520
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See above. </td></tr>
1526
<a class="anchor" name="ga31" doxytag="stream_decoder.h::FLAC__stream_decoder_get_channel_assignment"></a><p>
1527
<table class="mdTable" cellpadding="2" cellspacing="0">
1530
<table cellpadding="0" cellspacing="0" border="0">
1532
<td class="md" nowrap valign="top"><a class="el" href="group__flac__format.html#ga107">FLAC__ChannelAssignment</a> FLAC__stream_decoder_get_channel_assignment </td>
1533
<td class="md" valign="top">( </td>
1534
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1535
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1536
<td class="md" valign="top"> ) </td>
1537
<td class="md" nowrap></td>
1543
<table cellspacing="5" cellpadding="0" border="0">
1551
Get the current channel assignment in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<p>
1552
<dl compact><dt><b>Parameters:</b></dt><dd>
1553
<table border="0" cellspacing="2" cellpadding="0">
1554
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1557
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1558
</pre></div> </dd></dl>
1559
<dl compact><dt><b>Return values:</b></dt><dd>
1560
<table border="0" cellspacing="2" cellpadding="0">
1561
<tr><td valign="top"></td><td valign="top"><em>FLAC__ChannelAssignment</em> </td><td>See above. </td></tr>
1567
<a class="anchor" name="ga32" doxytag="stream_decoder.h::FLAC__stream_decoder_get_bits_per_sample"></a><p>
1568
<table class="mdTable" cellpadding="2" cellspacing="0">
1571
<table cellpadding="0" cellspacing="0" border="0">
1573
<td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_bits_per_sample </td>
1574
<td class="md" valign="top">( </td>
1575
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1576
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1577
<td class="md" valign="top"> ) </td>
1578
<td class="md" nowrap></td>
1584
<table cellspacing="5" cellpadding="0" border="0">
1592
Get the current sample resolution in the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<p>
1593
<dl compact><dt><b>Parameters:</b></dt><dd>
1594
<table border="0" cellspacing="2" cellpadding="0">
1595
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1598
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1599
</pre></div> </dd></dl>
1600
<dl compact><dt><b>Return values:</b></dt><dd>
1601
<table border="0" cellspacing="2" cellpadding="0">
1602
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See above. </td></tr>
1608
<a class="anchor" name="ga33" doxytag="stream_decoder.h::FLAC__stream_decoder_get_sample_rate"></a><p>
1609
<table class="mdTable" cellpadding="2" cellspacing="0">
1612
<table cellpadding="0" cellspacing="0" border="0">
1614
<td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_sample_rate </td>
1615
<td class="md" valign="top">( </td>
1616
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1617
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1618
<td class="md" valign="top"> ) </td>
1619
<td class="md" nowrap></td>
1625
<table cellspacing="5" cellpadding="0" border="0">
1633
Get the current sample rate in Hz of the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<p>
1634
<dl compact><dt><b>Parameters:</b></dt><dd>
1635
<table border="0" cellspacing="2" cellpadding="0">
1636
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1639
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1640
</pre></div> </dd></dl>
1641
<dl compact><dt><b>Return values:</b></dt><dd>
1642
<table border="0" cellspacing="2" cellpadding="0">
1643
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See above. </td></tr>
1649
<a class="anchor" name="ga34" doxytag="stream_decoder.h::FLAC__stream_decoder_get_blocksize"></a><p>
1650
<table class="mdTable" cellpadding="2" cellspacing="0">
1653
<table cellpadding="0" cellspacing="0" border="0">
1655
<td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_blocksize </td>
1656
<td class="md" valign="top">( </td>
1657
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1658
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
1659
<td class="md" valign="top"> ) </td>
1660
<td class="md" nowrap></td>
1666
<table cellspacing="5" cellpadding="0" border="0">
1674
Get the current blocksize of the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.<p>
1675
<dl compact><dt><b>Parameters:</b></dt><dd>
1676
<table border="0" cellspacing="2" cellpadding="0">
1677
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1680
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1681
</pre></div> </dd></dl>
1682
<dl compact><dt><b>Return values:</b></dt><dd>
1683
<table border="0" cellspacing="2" cellpadding="0">
1684
<tr><td valign="top"></td><td valign="top"><em>unsigned</em> </td><td>See above. </td></tr>
1690
<a class="anchor" name="ga35" doxytag="stream_decoder.h::FLAC__stream_decoder_get_decode_position"></a><p>
1691
<table class="mdTable" cellpadding="2" cellspacing="0">
1694
<table cellpadding="0" cellspacing="0" border="0">
1696
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_get_decode_position </td>
1697
<td class="md" valign="top">( </td>
1698
<td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1699
<td class="mdname" nowrap> <em>decoder</em>, </td>
1702
<td class="md" nowrap align="right"></td>
1703
<td class="md"></td>
1704
<td class="md" nowrap>FLAC__uint64 * </td>
1705
<td class="mdname" nowrap> <em>position</em></td>
1708
<td class="md"></td>
1709
<td class="md">) </td>
1710
<td class="md" colspan="2"></td>
1716
<table cellspacing="5" cellpadding="0" border="0">
1724
Returns the decoder's current read position within the stream. The position is the byte offset from the start of the stream. Bytes before this position have been fully decoded. Note that there may still be undecoded bytes in the decoder's read FIFO. The returned position is correct even after a seek.<p>
1725
<dl compact><dt><b>Warning:</b></dt><dd>This function currently only works for native FLAC, not Ogg FLAC streams.</dd></dl>
1726
<dl compact><dt><b>Parameters:</b></dt><dd>
1727
<table border="0" cellspacing="2" cellpadding="0">
1728
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance to query. </td></tr>
1729
<tr><td valign="top"></td><td valign="top"><em>position</em> </td><td>Address at which to return the desired position. </td></tr>
1732
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1733
</pre></div> <div class="fragment"><pre class="fragment"> position != NULL
1734
</pre></div> </dd></dl>
1735
<dl compact><dt><b>Return values:</b></dt><dd>
1736
<table border="0" cellspacing="2" cellpadding="0">
1737
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, <code>false</code> if the stream is not native FLAC, or there was an error from the 'tell' callback or it returned <code>FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</code>. </td></tr>
1743
<a class="anchor" name="ga36" doxytag="stream_decoder.h::FLAC__stream_decoder_init_stream"></a><p>
1744
<table class="mdTable" cellpadding="2" cellspacing="0">
1747
<table cellpadding="0" cellspacing="0" border="0">
1749
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_stream </td>
1750
<td class="md" valign="top">( </td>
1751
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1752
<td class="mdname" nowrap> <em>decoder</em>, </td>
1755
<td class="md" nowrap align="right"></td>
1756
<td class="md"></td>
1757
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a> </td>
1758
<td class="mdname" nowrap> <em>read_callback</em>, </td>
1761
<td class="md" nowrap align="right"></td>
1762
<td class="md"></td>
1763
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a> </td>
1764
<td class="mdname" nowrap> <em>seek_callback</em>, </td>
1767
<td class="md" nowrap align="right"></td>
1768
<td class="md"></td>
1769
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a> </td>
1770
<td class="mdname" nowrap> <em>tell_callback</em>, </td>
1773
<td class="md" nowrap align="right"></td>
1774
<td class="md"></td>
1775
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a> </td>
1776
<td class="mdname" nowrap> <em>length_callback</em>, </td>
1779
<td class="md" nowrap align="right"></td>
1780
<td class="md"></td>
1781
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a> </td>
1782
<td class="mdname" nowrap> <em>eof_callback</em>, </td>
1785
<td class="md" nowrap align="right"></td>
1786
<td class="md"></td>
1787
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
1788
<td class="mdname" nowrap> <em>write_callback</em>, </td>
1791
<td class="md" nowrap align="right"></td>
1792
<td class="md"></td>
1793
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
1794
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1797
<td class="md" nowrap align="right"></td>
1798
<td class="md"></td>
1799
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
1800
<td class="mdname" nowrap> <em>error_callback</em>, </td>
1803
<td class="md" nowrap align="right"></td>
1804
<td class="md"></td>
1805
<td class="md" nowrap>void * </td>
1806
<td class="mdname" nowrap> <em>client_data</em></td>
1809
<td class="md"></td>
1810
<td class="md">) </td>
1811
<td class="md" colspan="2"></td>
1817
<table cellspacing="5" cellpadding="0" border="0">
1825
Initialize the decoder instance to decode native FLAC streams.<p>
1826
This flavor of initialization sets up the decoder to decode from a native FLAC stream. I/O is performed via callbacks to the client. For decoding from a plain file via filename or open FILE*, <a class="el" href="group__flac__stream__decoder.html#ga40">FLAC__stream_decoder_init_file()</a> and <a class="el" href="group__flac__stream__decoder.html#ga38">FLAC__stream_decoder_init_FILE()</a> provide a simpler interface.<p>
1827
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
1828
<dl compact><dt><b>Parameters:</b></dt><dd>
1829
<table border="0" cellspacing="2" cellpadding="0">
1830
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
1831
<tr><td valign="top"></td><td valign="top"><em>read_callback</em> </td><td>See FLAC__StreamDecoderReadCallback. This pointer must not be <code>NULL</code>. </td></tr>
1832
<tr><td valign="top"></td><td valign="top"><em>seek_callback</em> </td><td>See FLAC__StreamDecoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em>, <em>length_callback</em>, and <em>eof_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1833
<tr><td valign="top"></td><td valign="top"><em>tell_callback</em> </td><td>See FLAC__StreamDecoderTellCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1834
<tr><td valign="top"></td><td valign="top"><em>length_callback</em> </td><td>See FLAC__StreamDecoderLengthCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>length_callback</em> must also be supplied. Alternatively, a dummy length callback that just returns <code>FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1835
<tr><td valign="top"></td><td valign="top"><em>eof_callback</em> </td><td>See FLAC__StreamDecoderEofCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>eof_callback</em> must also be supplied. Alternatively, a dummy length callback that just returns <code>false</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1836
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
1837
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
1838
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
1839
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
1842
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1843
</pre></div> </dd></dl>
1844
<dl compact><dt><b>Return values:</b></dt><dd>
1845
<table border="0" cellspacing="2" cellpadding="0">
1846
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
1852
<a class="anchor" name="ga37" doxytag="stream_decoder.h::FLAC__stream_decoder_init_ogg_stream"></a><p>
1853
<table class="mdTable" cellpadding="2" cellspacing="0">
1856
<table cellpadding="0" cellspacing="0" border="0">
1858
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_ogg_stream </td>
1859
<td class="md" valign="top">( </td>
1860
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1861
<td class="mdname" nowrap> <em>decoder</em>, </td>
1864
<td class="md" nowrap align="right"></td>
1865
<td class="md"></td>
1866
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga8">FLAC__StreamDecoderReadCallback</a> </td>
1867
<td class="mdname" nowrap> <em>read_callback</em>, </td>
1870
<td class="md" nowrap align="right"></td>
1871
<td class="md"></td>
1872
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga9">FLAC__StreamDecoderSeekCallback</a> </td>
1873
<td class="mdname" nowrap> <em>seek_callback</em>, </td>
1876
<td class="md" nowrap align="right"></td>
1877
<td class="md"></td>
1878
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga10">FLAC__StreamDecoderTellCallback</a> </td>
1879
<td class="mdname" nowrap> <em>tell_callback</em>, </td>
1882
<td class="md" nowrap align="right"></td>
1883
<td class="md"></td>
1884
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga11">FLAC__StreamDecoderLengthCallback</a> </td>
1885
<td class="mdname" nowrap> <em>length_callback</em>, </td>
1888
<td class="md" nowrap align="right"></td>
1889
<td class="md"></td>
1890
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga12">FLAC__StreamDecoderEofCallback</a> </td>
1891
<td class="mdname" nowrap> <em>eof_callback</em>, </td>
1894
<td class="md" nowrap align="right"></td>
1895
<td class="md"></td>
1896
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
1897
<td class="mdname" nowrap> <em>write_callback</em>, </td>
1900
<td class="md" nowrap align="right"></td>
1901
<td class="md"></td>
1902
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
1903
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1906
<td class="md" nowrap align="right"></td>
1907
<td class="md"></td>
1908
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
1909
<td class="mdname" nowrap> <em>error_callback</em>, </td>
1912
<td class="md" nowrap align="right"></td>
1913
<td class="md"></td>
1914
<td class="md" nowrap>void * </td>
1915
<td class="mdname" nowrap> <em>client_data</em></td>
1918
<td class="md"></td>
1919
<td class="md">) </td>
1920
<td class="md" colspan="2"></td>
1926
<table cellspacing="5" cellpadding="0" border="0">
1934
Initialize the decoder instance to decode Ogg FLAC streams.<p>
1935
This flavor of initialization sets up the decoder to decode from a FLAC stream in an Ogg container. I/O is performed via callbacks to the client. For decoding from a plain file via filename or open FILE*, <a class="el" href="group__flac__stream__decoder.html#ga41">FLAC__stream_decoder_init_ogg_file()</a> and <a class="el" href="group__flac__stream__decoder.html#ga39">FLAC__stream_decoder_init_ogg_FILE()</a> provide a simpler interface.<p>
1936
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
1937
<dl compact><dt><b>Note:</b></dt><dd>Support for Ogg FLAC in the library is optional. If this library has been built without support for Ogg FLAC, this function will return <code>FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER</code>.</dd></dl>
1938
<dl compact><dt><b>Parameters:</b></dt><dd>
1939
<table border="0" cellspacing="2" cellpadding="0">
1940
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
1941
<tr><td valign="top"></td><td valign="top"><em>read_callback</em> </td><td>See FLAC__StreamDecoderReadCallback. This pointer must not be <code>NULL</code>. </td></tr>
1942
<tr><td valign="top"></td><td valign="top"><em>seek_callback</em> </td><td>See FLAC__StreamDecoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em>, <em>length_callback</em>, and <em>eof_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1943
<tr><td valign="top"></td><td valign="top"><em>tell_callback</em> </td><td>See FLAC__StreamDecoderTellCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1944
<tr><td valign="top"></td><td valign="top"><em>length_callback</em> </td><td>See FLAC__StreamDecoderLengthCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>length_callback</em> must also be supplied. Alternatively, a dummy length callback that just returns <code>FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1945
<tr><td valign="top"></td><td valign="top"><em>eof_callback</em> </td><td>See FLAC__StreamDecoderEofCallback. This pointer may be <code>NULL</code> if not supported by the client. If <em>seek_callback</em> is not <code>NULL</code> then a <em>eof_callback</em> must also be supplied. Alternatively, a dummy length callback that just returns <code>false</code> may also be supplied, all though this is slightly less efficient for the decoder. </td></tr>
1946
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
1947
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
1948
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
1949
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
1952
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
1953
</pre></div> </dd></dl>
1954
<dl compact><dt><b>Return values:</b></dt><dd>
1955
<table border="0" cellspacing="2" cellpadding="0">
1956
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
1962
<a class="anchor" name="ga38" doxytag="stream_decoder.h::FLAC__stream_decoder_init_FILE"></a><p>
1963
<table class="mdTable" cellpadding="2" cellspacing="0">
1966
<table cellpadding="0" cellspacing="0" border="0">
1968
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_FILE </td>
1969
<td class="md" valign="top">( </td>
1970
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
1971
<td class="mdname" nowrap> <em>decoder</em>, </td>
1974
<td class="md" nowrap align="right"></td>
1975
<td class="md"></td>
1976
<td class="md" nowrap>FILE * </td>
1977
<td class="mdname" nowrap> <em>file</em>, </td>
1980
<td class="md" nowrap align="right"></td>
1981
<td class="md"></td>
1982
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
1983
<td class="mdname" nowrap> <em>write_callback</em>, </td>
1986
<td class="md" nowrap align="right"></td>
1987
<td class="md"></td>
1988
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
1989
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1992
<td class="md" nowrap align="right"></td>
1993
<td class="md"></td>
1994
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
1995
<td class="mdname" nowrap> <em>error_callback</em>, </td>
1998
<td class="md" nowrap align="right"></td>
1999
<td class="md"></td>
2000
<td class="md" nowrap>void * </td>
2001
<td class="mdname" nowrap> <em>client_data</em></td>
2004
<td class="md"></td>
2005
<td class="md">) </td>
2006
<td class="md" colspan="2"></td>
2012
<table cellspacing="5" cellpadding="0" border="0">
2020
Initialize the decoder instance to decode native FLAC files.<p>
2021
This flavor of initialization sets up the decoder to decode from a plain native FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__decoder.html#ga36">FLAC__stream_decoder_init_stream()</a> and provide callbacks for the I/O.<p>
2022
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
2023
<dl compact><dt><b>Parameters:</b></dt><dd>
2024
<table border="0" cellspacing="2" cellpadding="0">
2025
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
2026
<tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>An open FLAC file. The file should have been opened with mode <code>"rb"</code> and rewound. The file becomes owned by the decoder and should not be manipulated by the client while decoding. Unless <em>file</em> is <code>stdin</code>, it will be closed when <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> is called. Note however that seeking will not work when decoding from <code>stdout</code> since it is not seekable. </td></tr>
2027
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
2028
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
2029
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
2030
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2033
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2034
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL
2035
</pre></div> </dd></dl>
2036
<dl compact><dt><b>Return values:</b></dt><dd>
2037
<table border="0" cellspacing="2" cellpadding="0">
2038
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
2044
<a class="anchor" name="ga39" doxytag="stream_decoder.h::FLAC__stream_decoder_init_ogg_FILE"></a><p>
2045
<table class="mdTable" cellpadding="2" cellspacing="0">
2048
<table cellpadding="0" cellspacing="0" border="0">
2050
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_ogg_FILE </td>
2051
<td class="md" valign="top">( </td>
2052
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2053
<td class="mdname" nowrap> <em>decoder</em>, </td>
2056
<td class="md" nowrap align="right"></td>
2057
<td class="md"></td>
2058
<td class="md" nowrap>FILE * </td>
2059
<td class="mdname" nowrap> <em>file</em>, </td>
2062
<td class="md" nowrap align="right"></td>
2063
<td class="md"></td>
2064
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
2065
<td class="mdname" nowrap> <em>write_callback</em>, </td>
2068
<td class="md" nowrap align="right"></td>
2069
<td class="md"></td>
2070
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
2071
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2074
<td class="md" nowrap align="right"></td>
2075
<td class="md"></td>
2076
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
2077
<td class="mdname" nowrap> <em>error_callback</em>, </td>
2080
<td class="md" nowrap align="right"></td>
2081
<td class="md"></td>
2082
<td class="md" nowrap>void * </td>
2083
<td class="mdname" nowrap> <em>client_data</em></td>
2086
<td class="md"></td>
2087
<td class="md">) </td>
2088
<td class="md" colspan="2"></td>
2094
<table cellspacing="5" cellpadding="0" border="0">
2102
Initialize the decoder instance to decode Ogg FLAC files.<p>
2103
This flavor of initialization sets up the decoder to decode from a plain Ogg FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__decoder.html#ga37">FLAC__stream_decoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
2104
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
2105
<dl compact><dt><b>Note:</b></dt><dd>Support for Ogg FLAC in the library is optional. If this library has been built without support for Ogg FLAC, this function will return <code>FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER</code>.</dd></dl>
2106
<dl compact><dt><b>Parameters:</b></dt><dd>
2107
<table border="0" cellspacing="2" cellpadding="0">
2108
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
2109
<tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>An open FLAC file. The file should have been opened with mode <code>"rb"</code> and rewound. The file becomes owned by the decoder and should not be manipulated by the client while decoding. Unless <em>file</em> is <code>stdin</code>, it will be closed when <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> is called. Note however that seeking will not work when decoding from <code>stdout</code> since it is not seekable. </td></tr>
2110
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
2111
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
2112
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
2113
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2116
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2117
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL
2118
</pre></div> </dd></dl>
2119
<dl compact><dt><b>Return values:</b></dt><dd>
2120
<table border="0" cellspacing="2" cellpadding="0">
2121
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
2127
<a class="anchor" name="ga40" doxytag="stream_decoder.h::FLAC__stream_decoder_init_file"></a><p>
2128
<table class="mdTable" cellpadding="2" cellspacing="0">
2131
<table cellpadding="0" cellspacing="0" border="0">
2133
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_file </td>
2134
<td class="md" valign="top">( </td>
2135
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2136
<td class="mdname" nowrap> <em>decoder</em>, </td>
2139
<td class="md" nowrap align="right"></td>
2140
<td class="md"></td>
2141
<td class="md" nowrap>const char * </td>
2142
<td class="mdname" nowrap> <em>filename</em>, </td>
2145
<td class="md" nowrap align="right"></td>
2146
<td class="md"></td>
2147
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
2148
<td class="mdname" nowrap> <em>write_callback</em>, </td>
2151
<td class="md" nowrap align="right"></td>
2152
<td class="md"></td>
2153
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
2154
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2157
<td class="md" nowrap align="right"></td>
2158
<td class="md"></td>
2159
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
2160
<td class="mdname" nowrap> <em>error_callback</em>, </td>
2163
<td class="md" nowrap align="right"></td>
2164
<td class="md"></td>
2165
<td class="md" nowrap>void * </td>
2166
<td class="mdname" nowrap> <em>client_data</em></td>
2169
<td class="md"></td>
2170
<td class="md">) </td>
2171
<td class="md" colspan="2"></td>
2177
<table cellspacing="5" cellpadding="0" border="0">
2185
Initialize the decoder instance to decode native FLAC files.<p>
2186
This flavor of initialization sets up the decoder to decode from a plain native FLAC file. If POSIX fopen() semantics are not sufficient, (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__decoder.html#ga38">FLAC__stream_decoder_init_FILE()</a>, or <a class="el" href="group__flac__stream__decoder.html#ga36">FLAC__stream_decoder_init_stream()</a> and provide callbacks for the I/O.<p>
2187
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
2188
<dl compact><dt><b>Parameters:</b></dt><dd>
2189
<table border="0" cellspacing="2" cellpadding="0">
2190
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
2191
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The name of the file to decode from. The file will be opened with fopen(). Use <code>NULL</code> to decode from <code>stdin</code>. Note that <code>stdin</code> is not seekable. </td></tr>
2192
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
2193
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
2194
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
2195
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2198
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2199
</pre></div> </dd></dl>
2200
<dl compact><dt><b>Return values:</b></dt><dd>
2201
<table border="0" cellspacing="2" cellpadding="0">
2202
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
2208
<a class="anchor" name="ga41" doxytag="stream_decoder.h::FLAC__stream_decoder_init_ogg_file"></a><p>
2209
<table class="mdTable" cellpadding="2" cellspacing="0">
2212
<table cellpadding="0" cellspacing="0" border="0">
2214
<td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> FLAC__stream_decoder_init_ogg_file </td>
2215
<td class="md" valign="top">( </td>
2216
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2217
<td class="mdname" nowrap> <em>decoder</em>, </td>
2220
<td class="md" nowrap align="right"></td>
2221
<td class="md"></td>
2222
<td class="md" nowrap>const char * </td>
2223
<td class="mdname" nowrap> <em>filename</em>, </td>
2226
<td class="md" nowrap align="right"></td>
2227
<td class="md"></td>
2228
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga13">FLAC__StreamDecoderWriteCallback</a> </td>
2229
<td class="mdname" nowrap> <em>write_callback</em>, </td>
2232
<td class="md" nowrap align="right"></td>
2233
<td class="md"></td>
2234
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga14">FLAC__StreamDecoderMetadataCallback</a> </td>
2235
<td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2238
<td class="md" nowrap align="right"></td>
2239
<td class="md"></td>
2240
<td class="md" nowrap><a class="el" href="group__flac__stream__decoder.html#ga15">FLAC__StreamDecoderErrorCallback</a> </td>
2241
<td class="mdname" nowrap> <em>error_callback</em>, </td>
2244
<td class="md" nowrap align="right"></td>
2245
<td class="md"></td>
2246
<td class="md" nowrap>void * </td>
2247
<td class="mdname" nowrap> <em>client_data</em></td>
2250
<td class="md"></td>
2251
<td class="md">) </td>
2252
<td class="md" colspan="2"></td>
2258
<table cellspacing="5" cellpadding="0" border="0">
2266
Initialize the decoder instance to decode Ogg FLAC files.<p>
2267
This flavor of initialization sets up the decoder to decode from a plain Ogg FLAC file. If POSIX fopen() semantics are not sufficient, (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__decoder.html#ga39">FLAC__stream_decoder_init_ogg_FILE()</a>, or <a class="el" href="group__flac__stream__decoder.html#ga37">FLAC__stream_decoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
2268
This function should be called after <a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new()</a> and FLAC__stream_decoder_set_*() but before any of the FLAC__stream_decoder_process_*() functions. Will set and return the decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA if initialization succeeded.<p>
2269
<dl compact><dt><b>Note:</b></dt><dd>Support for Ogg FLAC in the library is optional. If this library has been built without support for Ogg FLAC, this function will return <code>FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER</code>.</dd></dl>
2270
<dl compact><dt><b>Parameters:</b></dt><dd>
2271
<table border="0" cellspacing="2" cellpadding="0">
2272
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
2273
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The name of the file to decode from. The file will be opened with fopen(). Use <code>NULL</code> to decode from <code>stdin</code>. Note that <code>stdin</code> is not seekable. </td></tr>
2274
<tr><td valign="top"></td><td valign="top"><em>write_callback</em> </td><td>See FLAC__StreamDecoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
2275
<tr><td valign="top"></td><td valign="top"><em>metadata_callback</em> </td><td>See FLAC__StreamDecoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
2276
<tr><td valign="top"></td><td valign="top"><em>error_callback</em> </td><td>See FLAC__StreamDecoderErrorCallback. This pointer must not be <code>NULL</code>. </td></tr>
2277
<tr><td valign="top"></td><td valign="top"><em>client_data</em> </td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2280
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2281
</pre></div> </dd></dl>
2282
<dl compact><dt><b>Return values:</b></dt><dd>
2283
<table border="0" cellspacing="2" cellpadding="0">
2284
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderInitStatus</em> </td><td><code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamDecoderInitStatus for the meanings of other return values. </td></tr>
2290
<a class="anchor" name="ga42" doxytag="stream_decoder.h::FLAC__stream_decoder_finish"></a><p>
2291
<table class="mdTable" cellpadding="2" cellspacing="0">
2294
<table cellpadding="0" cellspacing="0" border="0">
2296
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_finish </td>
2297
<td class="md" valign="top">( </td>
2298
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2299
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2300
<td class="md" valign="top"> ) </td>
2301
<td class="md" nowrap></td>
2307
<table cellspacing="5" cellpadding="0" border="0">
2315
Finish the decoding process. Flushes the decoding buffer, releases resources, resets the decoder settings to their defaults, and returns the decoder state to FLAC__STREAM_DECODER_UNINITIALIZED.<p>
2316
In the event of a prematurely-terminated decode, it is not strictly necessary to call this immediately before <a class="el" href="group__flac__stream__decoder.html#ga17">FLAC__stream_decoder_delete()</a> but it is good practice to match every FLAC__stream_decoder_init_*() with a <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a>.<p>
2317
<dl compact><dt><b>Parameters:</b></dt><dd>
2318
<table border="0" cellspacing="2" cellpadding="0">
2319
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An uninitialized decoder instance. </td></tr>
2322
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2323
</pre></div> </dd></dl>
2324
<dl compact><dt><b>Return values:</b></dt><dd>
2325
<table border="0" cellspacing="2" cellpadding="0">
2326
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if MD5 checking is on AND a STREAMINFO block was available AND the MD5 signature in the STREAMINFO block was non-zero AND the signature does not match the one computed by the decoder; else <code>true</code>. </td></tr>
2332
<a class="anchor" name="ga43" doxytag="stream_decoder.h::FLAC__stream_decoder_flush"></a><p>
2333
<table class="mdTable" cellpadding="2" cellspacing="0">
2336
<table cellpadding="0" cellspacing="0" border="0">
2338
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_flush </td>
2339
<td class="md" valign="top">( </td>
2340
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2341
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2342
<td class="md" valign="top"> ) </td>
2343
<td class="md" nowrap></td>
2349
<table cellspacing="5" cellpadding="0" border="0">
2357
Flush the stream input. The decoder's input buffer will be cleared and the state set to <code>FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC</code>. This will also turn off MD5 checking.<p>
2358
<dl compact><dt><b>Parameters:</b></dt><dd>
2359
<table border="0" cellspacing="2" cellpadding="0">
2360
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance. </td></tr>
2363
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2364
</pre></div> </dd></dl>
2365
<dl compact><dt><b>Return values:</b></dt><dd>
2366
<table border="0" cellspacing="2" cellpadding="0">
2367
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code> if a memory allocation error occurs (in which case the state will be set to <code>FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR</code>). </td></tr>
2373
<a class="anchor" name="ga44" doxytag="stream_decoder.h::FLAC__stream_decoder_reset"></a><p>
2374
<table class="mdTable" cellpadding="2" cellspacing="0">
2377
<table cellpadding="0" cellspacing="0" border="0">
2379
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_reset </td>
2380
<td class="md" valign="top">( </td>
2381
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2382
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2383
<td class="md" valign="top"> ) </td>
2384
<td class="md" nowrap></td>
2390
<table cellspacing="5" cellpadding="0" border="0">
2398
Reset the decoding process. The decoder's input buffer will be cleared and the state set to <code>FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</code>. This is similar to <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> except that the settings are preserved; there is no need to call FLAC__stream_decoder_init_*() before decoding again. MD5 checking will be restored to its original setting.<p>
2399
If the decoder is seekable, or was initialized with FLAC__stream_decoder_init*_FILE() or FLAC__stream_decoder_init*_file(), the decoder will also attempt to seek to the beginning of the file. If this rewind fails, this function will return <code>false</code>. It follows that <a class="el" href="group__flac__stream__decoder.html#ga44">FLAC__stream_decoder_reset()</a> cannot be used when decoding from <code>stdin</code>.<p>
2400
If the decoder was initialized with FLAC__stream_encoder_init*_stream() and is not seekable (i.e. no seek callback was provided or the seek callback returns <code>FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</code>), it is the duty of the client to start feeding data from the beginning of the stream on the next FLAC__stream_decoder_process() or FLAC__stream_decoder_process_interleaved() call.<p>
2401
<dl compact><dt><b>Parameters:</b></dt><dd>
2402
<table border="0" cellspacing="2" cellpadding="0">
2403
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance. </td></tr>
2406
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2407
</pre></div> </dd></dl>
2408
<dl compact><dt><b>Return values:</b></dt><dd>
2409
<table border="0" cellspacing="2" cellpadding="0">
2410
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code> if a memory allocation occurs (in which case the state will be set to <code>FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR</code>) or a seek error occurs (the state will be unchanged). </td></tr>
2416
<a class="anchor" name="ga45" doxytag="stream_decoder.h::FLAC__stream_decoder_process_single"></a><p>
2417
<table class="mdTable" cellpadding="2" cellspacing="0">
2420
<table cellpadding="0" cellspacing="0" border="0">
2422
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_single </td>
2423
<td class="md" valign="top">( </td>
2424
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2425
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2426
<td class="md" valign="top"> ) </td>
2427
<td class="md" nowrap></td>
2433
<table cellspacing="5" cellpadding="0" border="0">
2441
Decode one metadata block or audio frame. This version instructs the decoder to decode a either a single metadata block or a single frame and stop, unless the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.<p>
2442
As the decoder needs more input it will call the read callback. Depending on what was decoded, the metadata or write callback will be called with the decoded metadata block or audio frame.<p>
2443
Unless there is a fatal read error or end of stream, this function will return once one whole frame is decoded. In other words, if the stream is not synchronized or points to a corrupt frame header, the decoder will continue to try and resync until it gets to a valid frame, then decode one frame, then return. If the decoder points to a frame whose frame CRC in the frame footer does not match the computed frame CRC, this function will issue a FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH error to the error callback, and return, having decoded one complete, although corrupt, frame. (Such corrupted frames are sent as silence of the correct length to the write callback.)<p>
2444
<dl compact><dt><b>Parameters:</b></dt><dd>
2445
<table border="0" cellspacing="2" cellpadding="0">
2446
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An initialized decoder instance. </td></tr>
2449
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2450
</pre></div> </dd></dl>
2451
<dl compact><dt><b>Return values:</b></dt><dd>
2452
<table border="0" cellspacing="2" cellpadding="0">
2453
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else <code>true</code>; for more information about the decoder, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state()</a>. </td></tr>
2459
<a class="anchor" name="ga46" doxytag="stream_decoder.h::FLAC__stream_decoder_process_until_end_of_metadata"></a><p>
2460
<table class="mdTable" cellpadding="2" cellspacing="0">
2463
<table cellpadding="0" cellspacing="0" border="0">
2465
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata </td>
2466
<td class="md" valign="top">( </td>
2467
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2468
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2469
<td class="md" valign="top"> ) </td>
2470
<td class="md" nowrap></td>
2476
<table cellspacing="5" cellpadding="0" border="0">
2484
Decode until the end of the metadata. This version instructs the decoder to decode from the current position and continue until all the metadata has been read, or until the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.<p>
2485
As the decoder needs more input it will call the read callback. As each metadata block is decoded, the metadata callback will be called with the decoded metadata.<p>
2486
<dl compact><dt><b>Parameters:</b></dt><dd>
2487
<table border="0" cellspacing="2" cellpadding="0">
2488
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An initialized decoder instance. </td></tr>
2491
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2492
</pre></div> </dd></dl>
2493
<dl compact><dt><b>Return values:</b></dt><dd>
2494
<table border="0" cellspacing="2" cellpadding="0">
2495
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else <code>true</code>; for more information about the decoder, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state()</a>. </td></tr>
2501
<a class="anchor" name="ga47" doxytag="stream_decoder.h::FLAC__stream_decoder_process_until_end_of_stream"></a><p>
2502
<table class="mdTable" cellpadding="2" cellspacing="0">
2505
<table cellpadding="0" cellspacing="0" border="0">
2507
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_until_end_of_stream </td>
2508
<td class="md" valign="top">( </td>
2509
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2510
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2511
<td class="md" valign="top"> ) </td>
2512
<td class="md" nowrap></td>
2518
<table cellspacing="5" cellpadding="0" border="0">
2526
Decode until the end of the stream. This version instructs the decoder to decode from the current position and continue until the end of stream (the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>), or until the callbacks return a fatal error.<p>
2527
As the decoder needs more input it will call the read callback. As each metadata block and frame is decoded, the metadata or write callback will be called with the decoded metadata or frame.<p>
2528
<dl compact><dt><b>Parameters:</b></dt><dd>
2529
<table border="0" cellspacing="2" cellpadding="0">
2530
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An initialized decoder instance. </td></tr>
2533
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2534
</pre></div> </dd></dl>
2535
<dl compact><dt><b>Return values:</b></dt><dd>
2536
<table border="0" cellspacing="2" cellpadding="0">
2537
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else <code>true</code>; for more information about the decoder, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state()</a>. </td></tr>
2543
<a class="anchor" name="ga48" doxytag="stream_decoder.h::FLAC__stream_decoder_skip_single_frame"></a><p>
2544
<table class="mdTable" cellpadding="2" cellspacing="0">
2547
<table cellpadding="0" cellspacing="0" border="0">
2549
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_skip_single_frame </td>
2550
<td class="md" valign="top">( </td>
2551
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2552
<td class="mdname1" valign="top" nowrap> <em>decoder</em> </td>
2553
<td class="md" valign="top"> ) </td>
2554
<td class="md" nowrap></td>
2560
<table cellspacing="5" cellpadding="0" border="0">
2568
Skip one audio frame. This version instructs the decoder to 'skip' a single frame and stop, unless the callbacks return a fatal error or the read callback returns <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code>.<p>
2569
The decoding flow is the same as what occurs when <a class="el" href="group__flac__stream__decoder.html#ga45">FLAC__stream_decoder_process_single()</a> is called to process an audio frame, except that this function does not decode the parsed data into PCM or call the write callback. The integrity of the frame is still checked the same way as in the other process functions.<p>
2570
This function will return once one whole frame is skipped, in the same way that <a class="el" href="group__flac__stream__decoder.html#ga45">FLAC__stream_decoder_process_single()</a> will return once one whole frame is decoded.<p>
2571
This function can be used in more quickly determining FLAC frame boundaries when decoding of the actual data is not needed, for example when an application is separating a FLAC stream into frames for editing or storing in a container. To do this, the application can use <a class="el" href="group__flac__stream__decoder.html#ga48">FLAC__stream_decoder_skip_single_frame()</a> to quickly advance to the next frame, then use <a class="el" href="group__flac__stream__decoder.html#ga35">FLAC__stream_decoder_get_decode_position()</a> to find the new frame boundary.<p>
2572
This function should only be called when the stream has advanced past all the metadata, otherwise it will return <code>false</code>.<p>
2573
<dl compact><dt><b>Parameters:</b></dt><dd>
2574
<table border="0" cellspacing="2" cellpadding="0">
2575
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>An initialized decoder instance not in a metadata state. </td></tr>
2578
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2579
</pre></div> </dd></dl>
2580
<dl compact><dt><b>Return values:</b></dt><dd>
2581
<table border="0" cellspacing="2" cellpadding="0">
2582
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), or if the decoder is in the FLAC__STREAM_DECODER_SEARCH_FOR_METADATA or FLAC__STREAM_DECODER_READ_METADATA state, else <code>true</code>; for more information about the decoder, check the decoder state with <a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state()</a>. </td></tr>
2588
<a class="anchor" name="ga49" doxytag="stream_decoder.h::FLAC__stream_decoder_seek_absolute"></a><p>
2589
<table class="mdTable" cellpadding="2" cellspacing="0">
2592
<table cellpadding="0" cellspacing="0" border="0">
2594
<td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_seek_absolute </td>
2595
<td class="md" valign="top">( </td>
2596
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> * </td>
2597
<td class="mdname" nowrap> <em>decoder</em>, </td>
2600
<td class="md" nowrap align="right"></td>
2601
<td class="md"></td>
2602
<td class="md" nowrap>FLAC__uint64 </td>
2603
<td class="mdname" nowrap> <em>sample</em></td>
2606
<td class="md"></td>
2607
<td class="md">) </td>
2608
<td class="md" colspan="2"></td>
2614
<table cellspacing="5" cellpadding="0" border="0">
2622
Flush the input and seek to an absolute sample. Decoding will resume at the given sample. Note that because of this, the next write callback may contain a partial block. The client must support seeking the input or this function will fail and return <code>false</code>. Furthermore, if the decoder state is <code>FLAC__STREAM_DECODER_SEEK_ERROR</code>, then the decoder must be flushed with <a class="el" href="group__flac__stream__decoder.html#ga43">FLAC__stream_decoder_flush()</a> or reset with <a class="el" href="group__flac__stream__decoder.html#ga44">FLAC__stream_decoder_reset()</a> before decoding can continue.<p>
2623
<dl compact><dt><b>Parameters:</b></dt><dd>
2624
<table border="0" cellspacing="2" cellpadding="0">
2625
<tr><td valign="top"></td><td valign="top"><em>decoder</em> </td><td>A decoder instance. </td></tr>
2626
<tr><td valign="top"></td><td valign="top"><em>sample</em> </td><td>The target sample number to seek to. </td></tr>
2629
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL
2630
</pre></div> </dd></dl>
2631
<dl compact><dt><b>Return values:</b></dt><dd>
2632
<table border="0" cellspacing="2" cellpadding="0">
2633
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
1777
2639
<hr><h2>Variable Documentation</h2>
1778
<a name="a0" doxytag="stream_decoder.h::FLAC__StreamDecoderStateString"></a><p>
1779
<table width="100%" cellpadding="2" cellspacing="0" border="0">
2640
<a class="anchor" name="ga0" doxytag="stream_decoder.h::FLAC__StreamDecoderStateString"></a><p>
2641
<table class="mdTable" cellpadding="2" cellspacing="0">
1782
2644
<table cellpadding="0" cellspacing="0" border="0">
1784
<td class="md" nowrap valign="top"> const char* const FLAC__StreamDecoderStateString[]
2646
<td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga0">FLAC__StreamDecoderStateString</a>[] </td>
1789
<table cellspacing=5 cellpadding=0 border=0>
2652
<table cellspacing="5" cellpadding="0" border="0">