1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>FLAC: FLAC/stream_decoder.h: stream decoder interface</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.4.2 -->
7<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8<h1>FLAC/stream_decoder.h: stream decoder interface<br>
9<small>
10[<a class="el" href="group__flac__decoder.html">FLAC/_decoder.h: decoder interfaces</a>]</small>
11</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
12This module contains the functions which implement the stream decoder. 
13<p>
14The stream decoder can decode native FLAC, and optionally Ogg FLAC (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files.<p>
15The 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>
19<p>
20In 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>
21There 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>
22For 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>
23For 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>
24There 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>
25Once the decoder is initialized, your program will call one of several functions to start the decoding process:<p>
26<ul>
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>
28<p>
29When 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>
30Seeking 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>
31If 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>
32The 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>
33The 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>
34STREAMINFO 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>
37
38<p>
39<table border="0" cellpadding="0" cellspacing="0">
40<tr><td></td></tr>
41<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
42<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a></td></tr>
43
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>(*&nbsp;</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>
46
47<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a>(*&nbsp;</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>
48
49<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a>(*&nbsp;</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>
50
51<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a>(*&nbsp;</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>
52
53<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef FLAC__bool(*&nbsp;</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>
54
55<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__decoder.html#ga56">FLAC__StreamDecoderWriteStatus</a>(*&nbsp;</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>
56
57<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</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>
58
59<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</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>
60
61<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
62<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> { <br>
63&nbsp;&nbsp;<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>, 
67<br>
68&nbsp;&nbsp;<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>, 
72<br>
73&nbsp;&nbsp;<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>
75<br>
76 }</td></tr>
77
78<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a> { <br>
79&nbsp;&nbsp;<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>, 
83<br>
84&nbsp;&nbsp;<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>
86<br>
87 }</td></tr>
88
89<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
92 }</td></tr>
93
94<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
97 }</td></tr>
98
99<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
102 }</td></tr>
103
104<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
107 }</td></tr>
108
109<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
111 }</td></tr>
112
113<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</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>
117 }</td></tr>
118
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> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga16">FLAC__stream_decoder_new</a> (void)</td></tr>
121
122<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</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>
123
124<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
125
126<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
127
128<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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#ga113">FLAC__MetadataType</a> type)</td></tr>
129
130<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
131
132<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
133
134<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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#ga113">FLAC__MetadataType</a> type)</td></tr>
135
136<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
137
138<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
139
140<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a>&nbsp;</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>
141
142<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</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>
143
144<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
145
146<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__uint64&nbsp;</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>
147
148<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</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>
149
150<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__format.html#ga111">FLAC__ChannelAssignment</a>&nbsp;</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>
151
152<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</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>
153
154<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</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>
155
156<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</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>
157
158<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
159
160<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
161
162<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
163
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
165
166<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
167
168<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
169
170<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>&nbsp;</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>
171
172<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
173
174<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
175
176<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
177
178<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
179
180<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
181
182<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
183
184<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
185
186<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</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>
187
188<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
189<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga0">FLAC__StreamDecoderStateString</a> []</td></tr>
190
191<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga1">FLAC__StreamDecoderInitStatusString</a> []</td></tr>
192
193<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga2">FLAC__StreamDecoderReadStatusString</a> []</td></tr>
194
195<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga3">FLAC__StreamDecoderSeekStatusString</a> []</td></tr>
196
197<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga4">FLAC__StreamDecoderTellStatusString</a> []</td></tr>
198
199<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga5">FLAC__StreamDecoderLengthStatusString</a> []</td></tr>
200
201<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga6">FLAC__StreamDecoderWriteStatusString</a> []</td></tr>
202
203<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__decoder.html#ga7">FLAC__StreamDecoderErrorStatusString</a> []</td></tr>
204
205</table>
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">
209  <tr>
210    <td class="mdRow">
211      <table cellpadding="0" cellspacing="0" border="0">
212        <tr>
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>
214        </tr>
215      </table>
216    </td>
217  </tr>
218</table>
219<table cellspacing="5" cellpadding="0" border="0">
220  <tr>
221    <td>
222      &nbsp;
223    </td>
224    <td>
225
226<p>
227Signature for the read callback.<p>
228A 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>
229Here 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)
230 {
231   FILE *file = ((MyClientData*)client_data)-&gt;file;
232   <span class="keywordflow">if</span>(*bytes &gt; 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>;
240   }
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>;
243 }
244</pre></div><p>
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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
249    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
252  </table>
253</dl>
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>&nbsp;</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>
257  </table>
258</dl>
259    </td>
260  </tr>
261</table>
262<a class="anchor" name="ga9" doxytag="stream_decoder.h::FLAC__StreamDecoderSeekCallback"></a><p>
263<table class="mdTable" cellpadding="2" cellspacing="0">
264  <tr>
265    <td class="mdRow">
266      <table cellpadding="0" cellspacing="0" border="0">
267        <tr>
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>
269        </tr>
270      </table>
271    </td>
272  </tr>
273</table>
274<table cellspacing="5" cellpadding="0" border="0">
275  <tr>
276    <td>
277      &nbsp;
278    </td>
279    <td>
280
281<p>
282Signature for the seek callback.<p>
283A 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>
284Here 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)
285 {
286   FILE *file = ((MyClientData*)client_data)-&gt;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) &lt; 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>;
293 }
294</pre></div><p>
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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
299    <tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em>&nbsp;</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>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
301  </table>
302</dl>
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>&nbsp;</td><td>The callee's return status. </td></tr>
306  </table>
307</dl>
308    </td>
309  </tr>
310</table>
311<a class="anchor" name="ga10" doxytag="stream_decoder.h::FLAC__StreamDecoderTellCallback"></a><p>
312<table class="mdTable" cellpadding="2" cellspacing="0">
313  <tr>
314    <td class="mdRow">
315      <table cellpadding="0" cellspacing="0" border="0">
316        <tr>
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>
318        </tr>
319      </table>
320    </td>
321  </tr>
322</table>
323<table cellspacing="5" cellpadding="0" border="0">
324  <tr>
325    <td>
326      &nbsp;
327    </td>
328    <td>
329
330<p>
331Signature for the tell callback.<p>
332A 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>
333Here 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)
334 {
335   FILE *file = ((MyClientData*)client_data)-&gt;file;
336   off_t pos;
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)) &lt; 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>;
344   }
345 }
346</pre></div><p>
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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
351    <tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em>&nbsp;</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>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
353  </table>
354</dl>
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>&nbsp;</td><td>The callee's return status. </td></tr>
358  </table>
359</dl>
360    </td>
361  </tr>
362</table>
363<a class="anchor" name="ga11" doxytag="stream_decoder.h::FLAC__StreamDecoderLengthCallback"></a><p>
364<table class="mdTable" cellpadding="2" cellspacing="0">
365  <tr>
366    <td class="mdRow">
367      <table cellpadding="0" cellspacing="0" border="0">
368        <tr>
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>
370        </tr>
371      </table>
372    </td>
373  </tr>
374</table>
375<table cellspacing="5" cellpadding="0" border="0">
376  <tr>
377    <td>
378      &nbsp;
379    </td>
380    <td>
381
382<p>
383Signature for the length callback.<p>
384A 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>
385Here 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)
386 {
387   FILE *file = ((MyClientData*)client_data)-&gt;file;
388   <span class="keyword">struct </span>stat filestats;
389
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), &amp;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>;
397   }
398 }
399</pre></div><p>
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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
404    <tr><td valign="top"></td><td valign="top"><em>stream_length</em>&nbsp;</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>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
406  </table>
407</dl>
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>&nbsp;</td><td>The callee's return status. </td></tr>
411  </table>
412</dl>
413    </td>
414  </tr>
415</table>
416<a class="anchor" name="ga12" doxytag="stream_decoder.h::FLAC__StreamDecoderEofCallback"></a><p>
417<table class="mdTable" cellpadding="2" cellspacing="0">
418  <tr>
419    <td class="mdRow">
420      <table cellpadding="0" cellspacing="0" border="0">
421        <tr>
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>
423        </tr>
424      </table>
425    </td>
426  </tr>
427</table>
428<table cellspacing="5" cellpadding="0" border="0">
429  <tr>
430    <td>
431      &nbsp;
432    </td>
433    <td>
434
435<p>
436Signature for the EOF callback.<p>
437A 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>
438Here 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)-&gt;file;
440   <span class="keywordflow">return</span> feof(file)? <span class="keyword">true</span> : <span class="keyword">false</span>;
441 }
442</pre></div><p>
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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
447    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
448  </table>
449</dl>
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>&nbsp;</td><td><code>true</code> if the currently at the end of the stream, else <code>false</code>. </td></tr>
453  </table>
454</dl>
455    </td>
456  </tr>
457</table>
458<a class="anchor" name="ga13" doxytag="stream_decoder.h::FLAC__StreamDecoderWriteCallback"></a><p>
459<table class="mdTable" cellpadding="2" cellspacing="0">
460  <tr>
461    <td class="mdRow">
462      <table cellpadding="0" cellspacing="0" border="0">
463        <tr>
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>
465        </tr>
466      </table>
467    </td>
468  </tr>
469</table>
470<table cellspacing="5" cellpadding="0" border="0">
471  <tr>
472    <td>
473      &nbsp;
474    </td>
475    <td>
476
477<p>
478Signature for the write callback.<p>
479A 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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
484    <tr><td valign="top"></td><td valign="top"><em>frame</em>&nbsp;</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>&nbsp;</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-&gt;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>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
487  </table>
488</dl>
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>&nbsp;</td><td>The callee's return status. </td></tr>
492  </table>
493</dl>
494    </td>
495  </tr>
496</table>
497<a class="anchor" name="ga14" doxytag="stream_decoder.h::FLAC__StreamDecoderMetadataCallback"></a><p>
498<table class="mdTable" cellpadding="2" cellspacing="0">
499  <tr>
500    <td class="mdRow">
501      <table cellpadding="0" cellspacing="0" border="0">
502        <tr>
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>
504        </tr>
505      </table>
506    </td>
507  </tr>
508</table>
509<table cellspacing="5" cellpadding="0" border="0">
510  <tr>
511    <td>
512      &nbsp;
513    </td>
514    <td>
515
516<p>
517Signature for the metadata callback.<p>
518A 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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
523    <tr><td valign="top"></td><td valign="top"><em>metadata</em>&nbsp;</td><td>The decoded metadata block. </td></tr>
524    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
525  </table>
526</dl>
527    </td>
528  </tr>
529</table>
530<a class="anchor" name="ga15" doxytag="stream_decoder.h::FLAC__StreamDecoderErrorCallback"></a><p>
531<table class="mdTable" cellpadding="2" cellspacing="0">
532  <tr>
533    <td class="mdRow">
534      <table cellpadding="0" cellspacing="0" border="0">
535        <tr>
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>
537        </tr>
538      </table>
539    </td>
540  </tr>
541</table>
542<table cellspacing="5" cellpadding="0" border="0">
543  <tr>
544    <td>
545      &nbsp;
546    </td>
547    <td>
548
549<p>
550Signature for the error callback.<p>
551A 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>&nbsp;</td><td>The decoder instance calling the callback. </td></tr>
556    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error encountered by the decoder. </td></tr>
557    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_decoder_init_*(). </td></tr>
558  </table>
559</dl>
560    </td>
561  </tr>
562</table>
563<hr><h2>Enumeration Type Documentation</h2>
564<a class="anchor" name="ga50" doxytag="stream_decoder.h::FLAC__StreamDecoderState"></a><p>
565<table class="mdTable" cellpadding="2" cellspacing="0">
566  <tr>
567    <td class="mdRow">
568      <table cellpadding="0" cellspacing="0" border="0">
569        <tr>
570          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a>          </td>
571        </tr>
572      </table>
573    </td>
574  </tr>
575</table>
576<table cellspacing="5" cellpadding="0" border="0">
577  <tr>
578    <td>
579      &nbsp;
580    </td>
581    <td>
582
583<p>
584State values for a <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a><p>
585The decoder's state can be obtained by calling <a class="el" href="group__flac__stream__decoder.html#ga26">FLAC__stream_decoder_get_state()</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd>
586<table border="0" cellspacing="2" cellpadding="0">
587<tr><td valign="top"><em><a class="anchor" name="gga50a16" doxytag="FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"></a>FLAC__STREAM_DECODER_SEARCH_FOR_METADATA</em>&nbsp;</td><td>
588The decoder is ready to search for metadata. </td></tr>
589<tr><td valign="top"><em><a class="anchor" name="gga50a17" doxytag="FLAC__STREAM_DECODER_READ_METADATA"></a>FLAC__STREAM_DECODER_READ_METADATA</em>&nbsp;</td><td>
590The decoder is ready to or is in the process of reading metadata. </td></tr>
591<tr><td valign="top"><em><a class="anchor" name="gga50a18" doxytag="FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC"></a>FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC</em>&nbsp;</td><td>
592The decoder is ready to or is in the process of searching for the frame sync code. </td></tr>
593<tr><td valign="top"><em><a class="anchor" name="gga50a19" doxytag="FLAC__STREAM_DECODER_READ_FRAME"></a>FLAC__STREAM_DECODER_READ_FRAME</em>&nbsp;</td><td>
594The decoder is ready to or is in the process of reading a frame. </td></tr>
595<tr><td valign="top"><em><a class="anchor" name="gga50a20" doxytag="FLAC__STREAM_DECODER_END_OF_STREAM"></a>FLAC__STREAM_DECODER_END_OF_STREAM</em>&nbsp;</td><td>
596The decoder has reached the end of the stream. </td></tr>
597<tr><td valign="top"><em><a class="anchor" name="gga50a21" doxytag="FLAC__STREAM_DECODER_OGG_ERROR"></a>FLAC__STREAM_DECODER_OGG_ERROR</em>&nbsp;</td><td>
598An error occurred in the underlying Ogg layer. </td></tr>
599<tr><td valign="top"><em><a class="anchor" name="gga50a22" doxytag="FLAC__STREAM_DECODER_SEEK_ERROR"></a>FLAC__STREAM_DECODER_SEEK_ERROR</em>&nbsp;</td><td>
600An error occurred while seeking. 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. </td></tr>
601<tr><td valign="top"><em><a class="anchor" name="gga50a23" doxytag="FLAC__STREAM_DECODER_ABORTED"></a>FLAC__STREAM_DECODER_ABORTED</em>&nbsp;</td><td>
602The decoder was aborted by the read callback. </td></tr>
603<tr><td valign="top"><em><a class="anchor" name="gga50a24" doxytag="FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR"></a>FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR</em>&nbsp;</td><td>
604An error occurred allocating memory. The decoder is in an invalid state and can no longer be used. </td></tr>
605<tr><td valign="top"><em><a class="anchor" name="gga50a25" doxytag="FLAC__STREAM_DECODER_UNINITIALIZED"></a>FLAC__STREAM_DECODER_UNINITIALIZED</em>&nbsp;</td><td>
606The decoder is in the uninitialized state; one of the FLAC__stream_decoder_init_*() functions must be called before samples can be processed.</td></tr>
607</table>
608</dl>
609    </td>
610  </tr>
611</table>
612<a class="anchor" name="ga51" doxytag="stream_decoder.h::FLAC__StreamDecoderInitStatus"></a><p>
613<table class="mdTable" cellpadding="2" cellspacing="0">
614  <tr>
615    <td class="mdRow">
616      <table cellpadding="0" cellspacing="0" border="0">
617        <tr>
618          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga51">FLAC__StreamDecoderInitStatus</a>          </td>
619        </tr>
620      </table>
621    </td>
622  </tr>
623</table>
624<table cellspacing="5" cellpadding="0" border="0">
625  <tr>
626    <td>
627      &nbsp;
628    </td>
629    <td>
630
631<p>
632Possible return values for the FLAC__stream_decoder_init_*() functions. <dl compact><dt><b>Enumeration values: </b></dt><dd>
633<table border="0" cellspacing="2" cellpadding="0">
634<tr><td valign="top"><em><a class="anchor" name="gga51a26" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_OK"></a>FLAC__STREAM_DECODER_INIT_STATUS_OK</em>&nbsp;</td><td>
635Initialization was successful. </td></tr>
636<tr><td valign="top"><em><a class="anchor" name="gga51a27" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER"></a>FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER</em>&nbsp;</td><td>
637The library was not compiled with support for the given container format. </td></tr>
638<tr><td valign="top"><em><a class="anchor" name="gga51a28" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS"></a>FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS</em>&nbsp;</td><td>
639A required callback was not supplied. </td></tr>
640<tr><td valign="top"><em><a class="anchor" name="gga51a29" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR"></a>FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR</em>&nbsp;</td><td>
641An error occurred allocating memory. </td></tr>
642<tr><td valign="top"><em><a class="anchor" name="gga51a30" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE"></a>FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE</em>&nbsp;</td><td>
643fopen() failed in <a class="el" href="group__flac__stream__decoder.html#ga40">FLAC__stream_decoder_init_file()</a> or <a class="el" href="group__flac__stream__decoder.html#ga41">FLAC__stream_decoder_init_ogg_file()</a>. </td></tr>
644<tr><td valign="top"><em><a class="anchor" name="gga51a31" doxytag="FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED"></a>FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED</em>&nbsp;</td><td>
645FLAC__stream_decoder_init_*() was called when the decoder was already initialized, usually because <a class="el" href="group__flac__stream__decoder.html#ga42">FLAC__stream_decoder_finish()</a> was not called.</td></tr>
646</table>
647</dl>
648    </td>
649  </tr>
650</table>
651<a class="anchor" name="ga52" doxytag="stream_decoder.h::FLAC__StreamDecoderReadStatus"></a><p>
652<table class="mdTable" cellpadding="2" cellspacing="0">
653  <tr>
654    <td class="mdRow">
655      <table cellpadding="0" cellspacing="0" border="0">
656        <tr>
657          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga52">FLAC__StreamDecoderReadStatus</a>          </td>
658        </tr>
659      </table>
660    </td>
661  </tr>
662</table>
663<table cellspacing="5" cellpadding="0" border="0">
664  <tr>
665    <td>
666      &nbsp;
667    </td>
668    <td>
669
670<p>
671Return values for the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> read callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
672<table border="0" cellspacing="2" cellpadding="0">
673<tr><td valign="top"><em><a class="anchor" name="gga52a32" doxytag="FLAC__STREAM_DECODER_READ_STATUS_CONTINUE"></a>FLAC__STREAM_DECODER_READ_STATUS_CONTINUE</em>&nbsp;</td><td>
674The read was OK and decoding can continue. </td></tr>
675<tr><td valign="top"><em><a class="anchor" name="gga52a33" doxytag="FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM"></a>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</em>&nbsp;</td><td>
676The read was attempted while at the end of the stream. Note that the client must only return this value when the read callback was called when already at the end of the stream. Otherwise, if the read itself moves to the end of the stream, the client should still return the data and <code>FLAC__STREAM_DECODER_READ_STATUS_CONTINUE</code>, and then on the next read callback it should return <code>FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM</code> with a byte count of <code>0</code>. </td></tr>
677<tr><td valign="top"><em><a class="anchor" name="gga52a34" doxytag="FLAC__STREAM_DECODER_READ_STATUS_ABORT"></a>FLAC__STREAM_DECODER_READ_STATUS_ABORT</em>&nbsp;</td><td>
678An unrecoverable error occurred. The decoder will return from the process call. </td></tr>
679</table>
680</dl>
681    </td>
682  </tr>
683</table>
684<a class="anchor" name="ga53" doxytag="stream_decoder.h::FLAC__StreamDecoderSeekStatus"></a><p>
685<table class="mdTable" cellpadding="2" cellspacing="0">
686  <tr>
687    <td class="mdRow">
688      <table cellpadding="0" cellspacing="0" border="0">
689        <tr>
690          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga53">FLAC__StreamDecoderSeekStatus</a>          </td>
691        </tr>
692      </table>
693    </td>
694  </tr>
695</table>
696<table cellspacing="5" cellpadding="0" border="0">
697  <tr>
698    <td>
699      &nbsp;
700    </td>
701    <td>
702
703<p>
704Return values for the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> seek callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
705<table border="0" cellspacing="2" cellpadding="0">
706<tr><td valign="top"><em><a class="anchor" name="gga53a35" doxytag="FLAC__STREAM_DECODER_SEEK_STATUS_OK"></a>FLAC__STREAM_DECODER_SEEK_STATUS_OK</em>&nbsp;</td><td>
707The seek was OK and decoding can continue. </td></tr>
708<tr><td valign="top"><em><a class="anchor" name="gga53a36" doxytag="FLAC__STREAM_DECODER_SEEK_STATUS_ERROR"></a>FLAC__STREAM_DECODER_SEEK_STATUS_ERROR</em>&nbsp;</td><td>
709An unrecoverable error occurred. The decoder will return from the process call. </td></tr>
710<tr><td valign="top"><em><a class="anchor" name="gga53a37" doxytag="FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED"></a>FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
711Client does not support seeking. </td></tr>
712</table>
713</dl>
714    </td>
715  </tr>
716</table>
717<a class="anchor" name="ga54" doxytag="stream_decoder.h::FLAC__StreamDecoderTellStatus"></a><p>
718<table class="mdTable" cellpadding="2" cellspacing="0">
719  <tr>
720    <td class="mdRow">
721      <table cellpadding="0" cellspacing="0" border="0">
722        <tr>
723          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga54">FLAC__StreamDecoderTellStatus</a>          </td>
724        </tr>
725      </table>
726    </td>
727  </tr>
728</table>
729<table cellspacing="5" cellpadding="0" border="0">
730  <tr>
731    <td>
732      &nbsp;
733    </td>
734    <td>
735
736<p>
737Return values for the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> tell callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
738<table border="0" cellspacing="2" cellpadding="0">
739<tr><td valign="top"><em><a class="anchor" name="gga54a38" doxytag="FLAC__STREAM_DECODER_TELL_STATUS_OK"></a>FLAC__STREAM_DECODER_TELL_STATUS_OK</em>&nbsp;</td><td>
740The tell was OK and decoding can continue. </td></tr>
741<tr><td valign="top"><em><a class="anchor" name="gga54a39" doxytag="FLAC__STREAM_DECODER_TELL_STATUS_ERROR"></a>FLAC__STREAM_DECODER_TELL_STATUS_ERROR</em>&nbsp;</td><td>
742An unrecoverable error occurred. The decoder will return from the process call. </td></tr>
743<tr><td valign="top"><em><a class="anchor" name="gga54a40" doxytag="FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED"></a>FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
744Client does not support telling the position. </td></tr>
745</table>
746</dl>
747    </td>
748  </tr>
749</table>
750<a class="anchor" name="ga55" doxytag="stream_decoder.h::FLAC__StreamDecoderLengthStatus"></a><p>
751<table class="mdTable" cellpadding="2" cellspacing="0">
752  <tr>
753    <td class="mdRow">
754      <table cellpadding="0" cellspacing="0" border="0">
755        <tr>
756          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga55">FLAC__StreamDecoderLengthStatus</a>          </td>
757        </tr>
758      </table>
759    </td>
760  </tr>
761</table>
762<table cellspacing="5" cellpadding="0" border="0">
763  <tr>
764    <td>
765      &nbsp;
766    </td>
767    <td>
768
769<p>
770Return values for the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> length callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
771<table border="0" cellspacing="2" cellpadding="0">
772<tr><td valign="top"><em><a class="anchor" name="gga55a41" doxytag="FLAC__STREAM_DECODER_LENGTH_STATUS_OK"></a>FLAC__STREAM_DECODER_LENGTH_STATUS_OK</em>&nbsp;</td><td>
773The length call was OK and decoding can continue. </td></tr>
774<tr><td valign="top"><em><a class="anchor" name="gga55a42" doxytag="FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR"></a>FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR</em>&nbsp;</td><td>
775An unrecoverable error occurred. The decoder will return from the process call. </td></tr>
776<tr><td valign="top"><em><a class="anchor" name="gga55a43" doxytag="FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED"></a>FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
777Client does not support reporting the length. </td></tr>
778</table>
779</dl>
780    </td>
781  </tr>
782</table>
783<a class="anchor" name="ga56" doxytag="stream_decoder.h::FLAC__StreamDecoderWriteStatus"></a><p>
784<table class="mdTable" cellpadding="2" cellspacing="0">
785  <tr>
786    <td class="mdRow">
787      <table cellpadding="0" cellspacing="0" border="0">
788        <tr>
789          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga56">FLAC__StreamDecoderWriteStatus</a>          </td>
790        </tr>
791      </table>
792    </td>
793  </tr>
794</table>
795<table cellspacing="5" cellpadding="0" border="0">
796  <tr>
797    <td>
798      &nbsp;
799    </td>
800    <td>
801
802<p>
803Return values for the <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> write callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
804<table border="0" cellspacing="2" cellpadding="0">
805<tr><td valign="top"><em><a class="anchor" name="gga56a44" doxytag="FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE"></a>FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE</em>&nbsp;</td><td>
806The write was OK and decoding can continue. </td></tr>
807<tr><td valign="top"><em><a class="anchor" name="gga56a45" doxytag="FLAC__STREAM_DECODER_WRITE_STATUS_ABORT"></a>FLAC__STREAM_DECODER_WRITE_STATUS_ABORT</em>&nbsp;</td><td>
808An unrecoverable error occurred. The decoder will return from the process call. </td></tr>
809</table>
810</dl>
811    </td>
812  </tr>
813</table>
814<a class="anchor" name="ga57" doxytag="stream_decoder.h::FLAC__StreamDecoderErrorStatus"></a><p>
815<table class="mdTable" cellpadding="2" cellspacing="0">
816  <tr>
817    <td class="mdRow">
818      <table cellpadding="0" cellspacing="0" border="0">
819        <tr>
820          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__decoder.html#ga57">FLAC__StreamDecoderErrorStatus</a>          </td>
821        </tr>
822      </table>
823    </td>
824  </tr>
825</table>
826<table cellspacing="5" cellpadding="0" border="0">
827  <tr>
828    <td>
829      &nbsp;
830    </td>
831    <td>
832
833<p>
834Possible 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>&nbsp;</td><td>
837An error in the stream caused the decoder to lose synchronization. </td></tr>
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>&nbsp;</td><td>
839The decoder encountered a corrupted frame header. </td></tr>
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>&nbsp;</td><td>
841The 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>&nbsp;</td><td>
843The decoder encountered reserved fields in use in the stream. </td></tr>
844</table>
845</dl>
846    </td>
847  </tr>
848</table>
849<hr><h2>Function Documentation</h2>
850<a class="anchor" name="ga16" doxytag="stream_decoder.h::FLAC__stream_decoder_new"></a><p>
851<table class="mdTable" cellpadding="2" cellspacing="0">
852  <tr>
853    <td class="mdRow">
854      <table cellpadding="0" cellspacing="0" border="0">
855        <tr>
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">(&nbsp;</td>
858          <td class="md" nowrap valign="top">void&nbsp;</td>
859          <td class="mdname1" valign="top" nowrap>          </td>
860          <td class="md" valign="top">&nbsp;)&nbsp;</td>
861          <td class="md" nowrap></td>
862        </tr>
863      </table>
864    </td>
865  </tr>
866</table>
867<table cellspacing="5" cellpadding="0" border="0">
868  <tr>
869    <td>
870      &nbsp;
871    </td>
872    <td>
873
874<p>
875Create 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>&nbsp;</td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
879  </table>
880</dl>
881    </td>
882  </tr>
883</table>
884<a class="anchor" name="ga17" doxytag="stream_decoder.h::FLAC__stream_decoder_delete"></a><p>
885<table class="mdTable" cellpadding="2" cellspacing="0">
886  <tr>
887    <td class="mdRow">
888      <table cellpadding="0" cellspacing="0" border="0">
889        <tr>
890          <td class="md" nowrap valign="top">void FLAC__stream_decoder_delete           </td>
891          <td class="md" valign="top">(&nbsp;</td>
892          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
893          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
894          <td class="md" valign="top">&nbsp;)&nbsp;</td>
895          <td class="md" nowrap></td>
896        </tr>
897      </table>
898    </td>
899  </tr>
900</table>
901<table cellspacing="5" cellpadding="0" border="0">
902  <tr>
903    <td>
904      &nbsp;
905    </td>
906    <td>
907
908<p>
909Free 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>&nbsp;</td><td>A pointer to an existing decoder. </td></tr>
913  </table>
914</dl>
915<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> decoder != NULL 
916</pre></div> </dd></dl>
917    </td>
918  </tr>
919</table>
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">
922  <tr>
923    <td class="mdRow">
924      <table cellpadding="0" cellspacing="0" border="0">
925        <tr>
926          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_ogg_serial_number           </td>
927          <td class="md" valign="top">(&nbsp;</td>
928          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
929          <td class="mdname" nowrap> <em>decoder</em>, </td>
930        </tr>
931        <tr>
932          <td class="md" nowrap align="right"></td>
933          <td class="md"></td>
934          <td class="md" nowrap>long&nbsp;</td>
935          <td class="mdname" nowrap> <em>serial_number</em></td>
936        </tr>
937        <tr>
938          <td class="md"></td>
939          <td class="md">)&nbsp;</td>
940          <td class="md" colspan="2"></td>
941        </tr>
942      </table>
943    </td>
944  </tr>
945</table>
946<table cellspacing="5" cellpadding="0" border="0">
947  <tr>
948    <td>
949      &nbsp;
950    </td>
951    <td>
952
953<p>
954Set 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
960    <tr><td valign="top"></td><td valign="top"><em>serial_number</em>&nbsp;</td><td>See above. </td></tr>
961  </table>
962</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
968  </table>
969</dl>
970    </td>
971  </tr>
972</table>
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">
975  <tr>
976    <td class="mdRow">
977      <table cellpadding="0" cellspacing="0" border="0">
978        <tr>
979          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_md5_checking           </td>
980          <td class="md" valign="top">(&nbsp;</td>
981          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
982          <td class="mdname" nowrap> <em>decoder</em>, </td>
983        </tr>
984        <tr>
985          <td class="md" nowrap align="right"></td>
986          <td class="md"></td>
987          <td class="md" nowrap>FLAC__bool&nbsp;</td>
988          <td class="mdname" nowrap> <em>value</em></td>
989        </tr>
990        <tr>
991          <td class="md"></td>
992          <td class="md">)&nbsp;</td>
993          <td class="md" colspan="2"></td>
994        </tr>
995      </table>
996    </td>
997  </tr>
998</table>
999<table cellspacing="5" cellpadding="0" border="0">
1000  <tr>
1001    <td>
1002      &nbsp;
1003    </td>
1004    <td>
1005
1006<p>
1007Set 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>
1008MD5 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>
1009Clients 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1014    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Flag value (see above). </td></tr>
1015  </table>
1016</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1022  </table>
1023</dl>
1024    </td>
1025  </tr>
1026</table>
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">
1029  <tr>
1030    <td class="mdRow">
1031      <table cellpadding="0" cellspacing="0" border="0">
1032        <tr>
1033          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond           </td>
1034          <td class="md" valign="top">(&nbsp;</td>
1035          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1036          <td class="mdname" nowrap> <em>decoder</em>, </td>
1037        </tr>
1038        <tr>
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#ga113">FLAC__MetadataType</a>&nbsp;</td>
1042          <td class="mdname" nowrap> <em>type</em></td>
1043        </tr>
1044        <tr>
1045          <td class="md"></td>
1046          <td class="md">)&nbsp;</td>
1047          <td class="md" colspan="2"></td>
1048        </tr>
1049      </table>
1050    </td>
1051  </tr>
1052</table>
1053<table cellspacing="5" cellpadding="0" border="0">
1054  <tr>
1055    <td>
1056      &nbsp;
1057    </td>
1058    <td>
1059
1060<p>
1061Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1066    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>See above. </td></tr>
1067  </table>
1068</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1074  </table>
1075</dl>
1076    </td>
1077  </tr>
1078</table>
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">
1081  <tr>
1082    <td class="mdRow">
1083      <table cellpadding="0" cellspacing="0" border="0">
1084        <tr>
1085          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond_application           </td>
1086          <td class="md" valign="top">(&nbsp;</td>
1087          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1088          <td class="mdname" nowrap> <em>decoder</em>, </td>
1089        </tr>
1090        <tr>
1091          <td class="md" nowrap align="right"></td>
1092          <td class="md"></td>
1093          <td class="md" nowrap>const FLAC__byte&nbsp;</td>
1094          <td class="mdname" nowrap> <em>id</em>[4]</td>
1095        </tr>
1096        <tr>
1097          <td class="md"></td>
1098          <td class="md">)&nbsp;</td>
1099          <td class="md" colspan="2"></td>
1100        </tr>
1101      </table>
1102    </td>
1103  </tr>
1104</table>
1105<table cellspacing="5" cellpadding="0" border="0">
1106  <tr>
1107    <td>
1108      &nbsp;
1109    </td>
1110    <td>
1111
1112<p>
1113Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1118    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>See above. </td></tr>
1119  </table>
1120</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1127  </table>
1128</dl>
1129    </td>
1130  </tr>
1131</table>
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">
1134  <tr>
1135    <td class="mdRow">
1136      <table cellpadding="0" cellspacing="0" border="0">
1137        <tr>
1138          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_respond_all           </td>
1139          <td class="md" valign="top">(&nbsp;</td>
1140          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1141          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1142          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1143          <td class="md" nowrap></td>
1144        </tr>
1145      </table>
1146    </td>
1147  </tr>
1148</table>
1149<table cellspacing="5" cellpadding="0" border="0">
1150  <tr>
1151    <td>
1152      &nbsp;
1153    </td>
1154    <td>
1155
1156<p>
1157Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1162  </table>
1163</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1169  </table>
1170</dl>
1171    </td>
1172  </tr>
1173</table>
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">
1176  <tr>
1177    <td class="mdRow">
1178      <table cellpadding="0" cellspacing="0" border="0">
1179        <tr>
1180          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore           </td>
1181          <td class="md" valign="top">(&nbsp;</td>
1182          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1183          <td class="mdname" nowrap> <em>decoder</em>, </td>
1184        </tr>
1185        <tr>
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#ga113">FLAC__MetadataType</a>&nbsp;</td>
1189          <td class="mdname" nowrap> <em>type</em></td>
1190        </tr>
1191        <tr>
1192          <td class="md"></td>
1193          <td class="md">)&nbsp;</td>
1194          <td class="md" colspan="2"></td>
1195        </tr>
1196      </table>
1197    </td>
1198  </tr>
1199</table>
1200<table cellspacing="5" cellpadding="0" border="0">
1201  <tr>
1202    <td>
1203      &nbsp;
1204    </td>
1205    <td>
1206
1207<p>
1208Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1213    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>See above. </td></tr>
1214  </table>
1215</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1221  </table>
1222</dl>
1223    </td>
1224  </tr>
1225</table>
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">
1228  <tr>
1229    <td class="mdRow">
1230      <table cellpadding="0" cellspacing="0" border="0">
1231        <tr>
1232          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application           </td>
1233          <td class="md" valign="top">(&nbsp;</td>
1234          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1235          <td class="mdname" nowrap> <em>decoder</em>, </td>
1236        </tr>
1237        <tr>
1238          <td class="md" nowrap align="right"></td>
1239          <td class="md"></td>
1240          <td class="md" nowrap>const FLAC__byte&nbsp;</td>
1241          <td class="mdname" nowrap> <em>id</em>[4]</td>
1242        </tr>
1243        <tr>
1244          <td class="md"></td>
1245          <td class="md">)&nbsp;</td>
1246          <td class="md" colspan="2"></td>
1247        </tr>
1248      </table>
1249    </td>
1250  </tr>
1251</table>
1252<table cellspacing="5" cellpadding="0" border="0">
1253  <tr>
1254    <td>
1255      &nbsp;
1256    </td>
1257    <td>
1258
1259<p>
1260Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1265    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>See above. </td></tr>
1266  </table>
1267</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1274  </table>
1275</dl>
1276    </td>
1277  </tr>
1278</table>
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">
1281  <tr>
1282    <td class="mdRow">
1283      <table cellpadding="0" cellspacing="0" border="0">
1284        <tr>
1285          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all           </td>
1286          <td class="md" valign="top">(&nbsp;</td>
1287          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1288          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1289          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1290          <td class="md" nowrap></td>
1291        </tr>
1292      </table>
1293    </td>
1294  </tr>
1295</table>
1296<table cellspacing="5" cellpadding="0" border="0">
1297  <tr>
1298    <td>
1299      &nbsp;
1300    </td>
1301    <td>
1302
1303<p>
1304Direct 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>&nbsp;</td><td>A decoder instance to set. </td></tr>
1309  </table>
1310</dl>
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>&nbsp;</td><td><code>false</code> if the decoder is already initialized, else <code>true</code>. </td></tr>
1316  </table>
1317</dl>
1318    </td>
1319  </tr>
1320</table>
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">
1323  <tr>
1324    <td class="mdRow">
1325      <table cellpadding="0" cellspacing="0" border="0">
1326        <tr>
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">(&nbsp;</td>
1329          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1330          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1331          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1332          <td class="md" nowrap></td>
1333        </tr>
1334      </table>
1335    </td>
1336  </tr>
1337</table>
1338<table cellspacing="5" cellpadding="0" border="0">
1339  <tr>
1340    <td>
1341      &nbsp;
1342    </td>
1343    <td>
1344
1345<p>
1346Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1350  </table>
1351</dl>
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>&nbsp;</td><td>The current decoder state. </td></tr>
1357  </table>
1358</dl>
1359    </td>
1360  </tr>
1361</table>
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">
1364  <tr>
1365    <td class="mdRow">
1366      <table cellpadding="0" cellspacing="0" border="0">
1367        <tr>
1368          <td class="md" nowrap valign="top">const char* FLAC__stream_decoder_get_resolved_state_string           </td>
1369          <td class="md" valign="top">(&nbsp;</td>
1370          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1371          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1372          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1373          <td class="md" nowrap></td>
1374        </tr>
1375      </table>
1376    </td>
1377  </tr>
1378</table>
1379<table cellspacing="5" cellpadding="0" border="0">
1380  <tr>
1381    <td>
1382      &nbsp;
1383    </td>
1384    <td>
1385
1386<p>
1387Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1391  </table>
1392</dl>
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>&nbsp;</td><td>char * The decoder state as a C string. Do not modify the contents. </td></tr>
1398  </table>
1399</dl>
1400    </td>
1401  </tr>
1402</table>
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">
1405  <tr>
1406    <td class="mdRow">
1407      <table cellpadding="0" cellspacing="0" border="0">
1408        <tr>
1409          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_get_md5_checking           </td>
1410          <td class="md" valign="top">(&nbsp;</td>
1411          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1412          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1413          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1414          <td class="md" nowrap></td>
1415        </tr>
1416      </table>
1417    </td>
1418  </tr>
1419</table>
1420<table cellspacing="5" cellpadding="0" border="0">
1421  <tr>
1422    <td>
1423      &nbsp;
1424    </td>
1425    <td>
1426
1427<p>
1428Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1432  </table>
1433</dl>
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>&nbsp;</td><td>See above. </td></tr>
1439  </table>
1440</dl>
1441    </td>
1442  </tr>
1443</table>
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">
1446  <tr>
1447    <td class="mdRow">
1448      <table cellpadding="0" cellspacing="0" border="0">
1449        <tr>
1450          <td class="md" nowrap valign="top">FLAC__uint64 FLAC__stream_decoder_get_total_samples           </td>
1451          <td class="md" valign="top">(&nbsp;</td>
1452          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1453          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1454          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1455          <td class="md" nowrap></td>
1456        </tr>
1457      </table>
1458    </td>
1459  </tr>
1460</table>
1461<table cellspacing="5" cellpadding="0" border="0">
1462  <tr>
1463    <td>
1464      &nbsp;
1465    </td>
1466    <td>
1467
1468<p>
1469Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1473  </table>
1474</dl>
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>&nbsp;</td><td>See above. </td></tr>
1480  </table>
1481</dl>
1482    </td>
1483  </tr>
1484</table>
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">
1487  <tr>
1488    <td class="mdRow">
1489      <table cellpadding="0" cellspacing="0" border="0">
1490        <tr>
1491          <td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_channels           </td>
1492          <td class="md" valign="top">(&nbsp;</td>
1493          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1494          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1495          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1496          <td class="md" nowrap></td>
1497        </tr>
1498      </table>
1499    </td>
1500  </tr>
1501</table>
1502<table cellspacing="5" cellpadding="0" border="0">
1503  <tr>
1504    <td>
1505      &nbsp;
1506    </td>
1507    <td>
1508
1509<p>
1510Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1514  </table>
1515</dl>
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>&nbsp;</td><td>See above. </td></tr>
1521  </table>
1522</dl>
1523    </td>
1524  </tr>
1525</table>
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">
1528  <tr>
1529    <td class="mdRow">
1530      <table cellpadding="0" cellspacing="0" border="0">
1531        <tr>
1532          <td class="md" nowrap valign="top"><a class="el" href="group__flac__format.html#ga111">FLAC__ChannelAssignment</a> FLAC__stream_decoder_get_channel_assignment           </td>
1533          <td class="md" valign="top">(&nbsp;</td>
1534          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1535          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1536          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1537          <td class="md" nowrap></td>
1538        </tr>
1539      </table>
1540    </td>
1541  </tr>
1542</table>
1543<table cellspacing="5" cellpadding="0" border="0">
1544  <tr>
1545    <td>
1546      &nbsp;
1547    </td>
1548    <td>
1549
1550<p>
1551Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1555  </table>
1556</dl>
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>&nbsp;</td><td>See above. </td></tr>
1562  </table>
1563</dl>
1564    </td>
1565  </tr>
1566</table>
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">
1569  <tr>
1570    <td class="mdRow">
1571      <table cellpadding="0" cellspacing="0" border="0">
1572        <tr>
1573          <td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_bits_per_sample           </td>
1574          <td class="md" valign="top">(&nbsp;</td>
1575          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1576          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1577          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1578          <td class="md" nowrap></td>
1579        </tr>
1580      </table>
1581    </td>
1582  </tr>
1583</table>
1584<table cellspacing="5" cellpadding="0" border="0">
1585  <tr>
1586    <td>
1587      &nbsp;
1588    </td>
1589    <td>
1590
1591<p>
1592Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1596  </table>
1597</dl>
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>&nbsp;</td><td>See above. </td></tr>
1603  </table>
1604</dl>
1605    </td>
1606  </tr>
1607</table>
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">
1610  <tr>
1611    <td class="mdRow">
1612      <table cellpadding="0" cellspacing="0" border="0">
1613        <tr>
1614          <td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_sample_rate           </td>
1615          <td class="md" valign="top">(&nbsp;</td>
1616          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1617          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1618          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1619          <td class="md" nowrap></td>
1620        </tr>
1621      </table>
1622    </td>
1623  </tr>
1624</table>
1625<table cellspacing="5" cellpadding="0" border="0">
1626  <tr>
1627    <td>
1628      &nbsp;
1629    </td>
1630    <td>
1631
1632<p>
1633Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1637  </table>
1638</dl>
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>&nbsp;</td><td>See above. </td></tr>
1644  </table>
1645</dl>
1646    </td>
1647  </tr>
1648</table>
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">
1651  <tr>
1652    <td class="mdRow">
1653      <table cellpadding="0" cellspacing="0" border="0">
1654        <tr>
1655          <td class="md" nowrap valign="top">unsigned FLAC__stream_decoder_get_blocksize           </td>
1656          <td class="md" valign="top">(&nbsp;</td>
1657          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1658          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
1659          <td class="md" valign="top">&nbsp;)&nbsp;</td>
1660          <td class="md" nowrap></td>
1661        </tr>
1662      </table>
1663    </td>
1664  </tr>
1665</table>
1666<table cellspacing="5" cellpadding="0" border="0">
1667  <tr>
1668    <td>
1669      &nbsp;
1670    </td>
1671    <td>
1672
1673<p>
1674Get 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1678  </table>
1679</dl>
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>&nbsp;</td><td>See above. </td></tr>
1685  </table>
1686</dl>
1687    </td>
1688  </tr>
1689</table>
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">
1692  <tr>
1693    <td class="mdRow">
1694      <table cellpadding="0" cellspacing="0" border="0">
1695        <tr>
1696          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_get_decode_position           </td>
1697          <td class="md" valign="top">(&nbsp;</td>
1698          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1699          <td class="mdname" nowrap> <em>decoder</em>, </td>
1700        </tr>
1701        <tr>
1702          <td class="md" nowrap align="right"></td>
1703          <td class="md"></td>
1704          <td class="md" nowrap>FLAC__uint64 *&nbsp;</td>
1705          <td class="mdname" nowrap> <em>position</em></td>
1706        </tr>
1707        <tr>
1708          <td class="md"></td>
1709          <td class="md">)&nbsp;</td>
1710          <td class="md" colspan="2"></td>
1711        </tr>
1712      </table>
1713    </td>
1714  </tr>
1715</table>
1716<table cellspacing="5" cellpadding="0" border="0">
1717  <tr>
1718    <td>
1719      &nbsp;
1720    </td>
1721    <td>
1722
1723<p>
1724Returns 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>&nbsp;</td><td>A decoder instance to query. </td></tr>
1729    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>Address at which to return the desired position. </td></tr>
1730  </table>
1731</dl>
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>&nbsp;</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>
1738  </table>
1739</dl>
1740    </td>
1741  </tr>
1742</table>
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">
1745  <tr>
1746    <td class="mdRow">
1747      <table cellpadding="0" cellspacing="0" border="0">
1748        <tr>
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">(&nbsp;</td>
1751          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1752          <td class="mdname" nowrap> <em>decoder</em>, </td>
1753        </tr>
1754        <tr>
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>&nbsp;</td>
1758          <td class="mdname" nowrap> <em>read_callback</em>, </td>
1759        </tr>
1760        <tr>
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>&nbsp;</td>
1764          <td class="mdname" nowrap> <em>seek_callback</em>, </td>
1765        </tr>
1766        <tr>
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>&nbsp;</td>
1770          <td class="mdname" nowrap> <em>tell_callback</em>, </td>
1771        </tr>
1772        <tr>
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>&nbsp;</td>
1776          <td class="mdname" nowrap> <em>length_callback</em>, </td>
1777        </tr>
1778        <tr>
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>&nbsp;</td>
1782          <td class="mdname" nowrap> <em>eof_callback</em>, </td>
1783        </tr>
1784        <tr>
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>&nbsp;</td>
1788          <td class="mdname" nowrap> <em>write_callback</em>, </td>
1789        </tr>
1790        <tr>
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>&nbsp;</td>
1794          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1795        </tr>
1796        <tr>
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>&nbsp;</td>
1800          <td class="mdname" nowrap> <em>error_callback</em>, </td>
1801        </tr>
1802        <tr>
1803          <td class="md" nowrap align="right"></td>
1804          <td class="md"></td>
1805          <td class="md" nowrap>void *&nbsp;</td>
1806          <td class="mdname" nowrap> <em>client_data</em></td>
1807        </tr>
1808        <tr>
1809          <td class="md"></td>
1810          <td class="md">)&nbsp;</td>
1811          <td class="md" colspan="2"></td>
1812        </tr>
1813      </table>
1814    </td>
1815  </tr>
1816</table>
1817<table cellspacing="5" cellpadding="0" border="0">
1818  <tr>
1819    <td>
1820      &nbsp;
1821    </td>
1822    <td>
1823
1824<p>
1825Initialize the decoder instance to decode native FLAC streams.<p>
1826This 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>
1827This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
1831    <tr><td valign="top"></td><td valign="top"><em>read_callback</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
1840  </table>
1841</dl>
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>&nbsp;</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>
1847  </table>
1848</dl>
1849    </td>
1850  </tr>
1851</table>
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">
1854  <tr>
1855    <td class="mdRow">
1856      <table cellpadding="0" cellspacing="0" border="0">
1857        <tr>
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">(&nbsp;</td>
1860          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1861          <td class="mdname" nowrap> <em>decoder</em>, </td>
1862        </tr>
1863        <tr>
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>&nbsp;</td>
1867          <td class="mdname" nowrap> <em>read_callback</em>, </td>
1868        </tr>
1869        <tr>
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>&nbsp;</td>
1873          <td class="mdname" nowrap> <em>seek_callback</em>, </td>
1874        </tr>
1875        <tr>
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>&nbsp;</td>
1879          <td class="mdname" nowrap> <em>tell_callback</em>, </td>
1880        </tr>
1881        <tr>
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>&nbsp;</td>
1885          <td class="mdname" nowrap> <em>length_callback</em>, </td>
1886        </tr>
1887        <tr>
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>&nbsp;</td>
1891          <td class="mdname" nowrap> <em>eof_callback</em>, </td>
1892        </tr>
1893        <tr>
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>&nbsp;</td>
1897          <td class="mdname" nowrap> <em>write_callback</em>, </td>
1898        </tr>
1899        <tr>
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>&nbsp;</td>
1903          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1904        </tr>
1905        <tr>
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>&nbsp;</td>
1909          <td class="mdname" nowrap> <em>error_callback</em>, </td>
1910        </tr>
1911        <tr>
1912          <td class="md" nowrap align="right"></td>
1913          <td class="md"></td>
1914          <td class="md" nowrap>void *&nbsp;</td>
1915          <td class="mdname" nowrap> <em>client_data</em></td>
1916        </tr>
1917        <tr>
1918          <td class="md"></td>
1919          <td class="md">)&nbsp;</td>
1920          <td class="md" colspan="2"></td>
1921        </tr>
1922      </table>
1923    </td>
1924  </tr>
1925</table>
1926<table cellspacing="5" cellpadding="0" border="0">
1927  <tr>
1928    <td>
1929      &nbsp;
1930    </td>
1931    <td>
1932
1933<p>
1934Initialize the decoder instance to decode Ogg FLAC streams.<p>
1935This 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>
1936This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
1941    <tr><td valign="top"></td><td valign="top"><em>read_callback</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
1950  </table>
1951</dl>
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>&nbsp;</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>
1957  </table>
1958</dl>
1959    </td>
1960  </tr>
1961</table>
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">
1964  <tr>
1965    <td class="mdRow">
1966      <table cellpadding="0" cellspacing="0" border="0">
1967        <tr>
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">(&nbsp;</td>
1970          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
1971          <td class="mdname" nowrap> <em>decoder</em>, </td>
1972        </tr>
1973        <tr>
1974          <td class="md" nowrap align="right"></td>
1975          <td class="md"></td>
1976          <td class="md" nowrap>FILE *&nbsp;</td>
1977          <td class="mdname" nowrap> <em>file</em>, </td>
1978        </tr>
1979        <tr>
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>&nbsp;</td>
1983          <td class="mdname" nowrap> <em>write_callback</em>, </td>
1984        </tr>
1985        <tr>
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>&nbsp;</td>
1989          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
1990        </tr>
1991        <tr>
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>&nbsp;</td>
1995          <td class="mdname" nowrap> <em>error_callback</em>, </td>
1996        </tr>
1997        <tr>
1998          <td class="md" nowrap align="right"></td>
1999          <td class="md"></td>
2000          <td class="md" nowrap>void *&nbsp;</td>
2001          <td class="mdname" nowrap> <em>client_data</em></td>
2002        </tr>
2003        <tr>
2004          <td class="md"></td>
2005          <td class="md">)&nbsp;</td>
2006          <td class="md" colspan="2"></td>
2007        </tr>
2008      </table>
2009    </td>
2010  </tr>
2011</table>
2012<table cellspacing="5" cellpadding="0" border="0">
2013  <tr>
2014    <td>
2015      &nbsp;
2016    </td>
2017    <td>
2018
2019<p>
2020Initialize the decoder instance to decode native FLAC files.<p>
2021This 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>
2022This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
2026    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2031  </table>
2032</dl>
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>&nbsp;</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>
2039  </table>
2040</dl>
2041    </td>
2042  </tr>
2043</table>
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">
2046  <tr>
2047    <td class="mdRow">
2048      <table cellpadding="0" cellspacing="0" border="0">
2049        <tr>
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">(&nbsp;</td>
2052          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2053          <td class="mdname" nowrap> <em>decoder</em>, </td>
2054        </tr>
2055        <tr>
2056          <td class="md" nowrap align="right"></td>
2057          <td class="md"></td>
2058          <td class="md" nowrap>FILE *&nbsp;</td>
2059          <td class="mdname" nowrap> <em>file</em>, </td>
2060        </tr>
2061        <tr>
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>&nbsp;</td>
2065          <td class="mdname" nowrap> <em>write_callback</em>, </td>
2066        </tr>
2067        <tr>
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>&nbsp;</td>
2071          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2072        </tr>
2073        <tr>
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>&nbsp;</td>
2077          <td class="mdname" nowrap> <em>error_callback</em>, </td>
2078        </tr>
2079        <tr>
2080          <td class="md" nowrap align="right"></td>
2081          <td class="md"></td>
2082          <td class="md" nowrap>void *&nbsp;</td>
2083          <td class="mdname" nowrap> <em>client_data</em></td>
2084        </tr>
2085        <tr>
2086          <td class="md"></td>
2087          <td class="md">)&nbsp;</td>
2088          <td class="md" colspan="2"></td>
2089        </tr>
2090      </table>
2091    </td>
2092  </tr>
2093</table>
2094<table cellspacing="5" cellpadding="0" border="0">
2095  <tr>
2096    <td>
2097      &nbsp;
2098    </td>
2099    <td>
2100
2101<p>
2102Initialize the decoder instance to decode Ogg FLAC files.<p>
2103This 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>
2104This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
2109    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2114  </table>
2115</dl>
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>&nbsp;</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>
2122  </table>
2123</dl>
2124    </td>
2125  </tr>
2126</table>
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">
2129  <tr>
2130    <td class="mdRow">
2131      <table cellpadding="0" cellspacing="0" border="0">
2132        <tr>
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">(&nbsp;</td>
2135          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2136          <td class="mdname" nowrap> <em>decoder</em>, </td>
2137        </tr>
2138        <tr>
2139          <td class="md" nowrap align="right"></td>
2140          <td class="md"></td>
2141          <td class="md" nowrap>const char *&nbsp;</td>
2142          <td class="mdname" nowrap> <em>filename</em>, </td>
2143        </tr>
2144        <tr>
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>&nbsp;</td>
2148          <td class="mdname" nowrap> <em>write_callback</em>, </td>
2149        </tr>
2150        <tr>
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>&nbsp;</td>
2154          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2155        </tr>
2156        <tr>
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>&nbsp;</td>
2160          <td class="mdname" nowrap> <em>error_callback</em>, </td>
2161        </tr>
2162        <tr>
2163          <td class="md" nowrap align="right"></td>
2164          <td class="md"></td>
2165          <td class="md" nowrap>void *&nbsp;</td>
2166          <td class="mdname" nowrap> <em>client_data</em></td>
2167        </tr>
2168        <tr>
2169          <td class="md"></td>
2170          <td class="md">)&nbsp;</td>
2171          <td class="md" colspan="2"></td>
2172        </tr>
2173      </table>
2174    </td>
2175  </tr>
2176</table>
2177<table cellspacing="5" cellpadding="0" border="0">
2178  <tr>
2179    <td>
2180      &nbsp;
2181    </td>
2182    <td>
2183
2184<p>
2185Initialize the decoder instance to decode native FLAC files.<p>
2186This 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>
2187This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
2191    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2196  </table>
2197</dl>
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>&nbsp;</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>
2203  </table>
2204</dl>
2205    </td>
2206  </tr>
2207</table>
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">
2210  <tr>
2211    <td class="mdRow">
2212      <table cellpadding="0" cellspacing="0" border="0">
2213        <tr>
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">(&nbsp;</td>
2216          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2217          <td class="mdname" nowrap> <em>decoder</em>, </td>
2218        </tr>
2219        <tr>
2220          <td class="md" nowrap align="right"></td>
2221          <td class="md"></td>
2222          <td class="md" nowrap>const char *&nbsp;</td>
2223          <td class="mdname" nowrap> <em>filename</em>, </td>
2224        </tr>
2225        <tr>
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>&nbsp;</td>
2229          <td class="mdname" nowrap> <em>write_callback</em>, </td>
2230        </tr>
2231        <tr>
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>&nbsp;</td>
2235          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
2236        </tr>
2237        <tr>
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>&nbsp;</td>
2241          <td class="mdname" nowrap> <em>error_callback</em>, </td>
2242        </tr>
2243        <tr>
2244          <td class="md" nowrap align="right"></td>
2245          <td class="md"></td>
2246          <td class="md" nowrap>void *&nbsp;</td>
2247          <td class="mdname" nowrap> <em>client_data</em></td>
2248        </tr>
2249        <tr>
2250          <td class="md"></td>
2251          <td class="md">)&nbsp;</td>
2252          <td class="md" colspan="2"></td>
2253        </tr>
2254      </table>
2255    </td>
2256  </tr>
2257</table>
2258<table cellspacing="5" cellpadding="0" border="0">
2259  <tr>
2260    <td>
2261      &nbsp;
2262    </td>
2263    <td>
2264
2265<p>
2266Initialize the decoder instance to decode Ogg FLAC files.<p>
2267This 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>
2268This 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
2273    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
2278  </table>
2279</dl>
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>&nbsp;</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>
2285  </table>
2286</dl>
2287    </td>
2288  </tr>
2289</table>
2290<a class="anchor" name="ga42" doxytag="stream_decoder.h::FLAC__stream_decoder_finish"></a><p>
2291<table class="mdTable" cellpadding="2" cellspacing="0">
2292  <tr>
2293    <td class="mdRow">
2294      <table cellpadding="0" cellspacing="0" border="0">
2295        <tr>
2296          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_finish           </td>
2297          <td class="md" valign="top">(&nbsp;</td>
2298          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2299          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2300          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2301          <td class="md" nowrap></td>
2302        </tr>
2303      </table>
2304    </td>
2305  </tr>
2306</table>
2307<table cellspacing="5" cellpadding="0" border="0">
2308  <tr>
2309    <td>
2310      &nbsp;
2311    </td>
2312    <td>
2313
2314<p>
2315Finish 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>
2316In 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>&nbsp;</td><td>An uninitialized decoder instance. </td></tr>
2320  </table>
2321</dl>
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>&nbsp;</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>
2327  </table>
2328</dl>
2329    </td>
2330  </tr>
2331</table>
2332<a class="anchor" name="ga43" doxytag="stream_decoder.h::FLAC__stream_decoder_flush"></a><p>
2333<table class="mdTable" cellpadding="2" cellspacing="0">
2334  <tr>
2335    <td class="mdRow">
2336      <table cellpadding="0" cellspacing="0" border="0">
2337        <tr>
2338          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_flush           </td>
2339          <td class="md" valign="top">(&nbsp;</td>
2340          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2341          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2342          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2343          <td class="md" nowrap></td>
2344        </tr>
2345      </table>
2346    </td>
2347  </tr>
2348</table>
2349<table cellspacing="5" cellpadding="0" border="0">
2350  <tr>
2351    <td>
2352      &nbsp;
2353    </td>
2354    <td>
2355
2356<p>
2357Flush 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>&nbsp;</td><td>A decoder instance. </td></tr>
2361  </table>
2362</dl>
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>&nbsp;</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>
2368  </table>
2369</dl>
2370    </td>
2371  </tr>
2372</table>
2373<a class="anchor" name="ga44" doxytag="stream_decoder.h::FLAC__stream_decoder_reset"></a><p>
2374<table class="mdTable" cellpadding="2" cellspacing="0">
2375  <tr>
2376    <td class="mdRow">
2377      <table cellpadding="0" cellspacing="0" border="0">
2378        <tr>
2379          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_reset           </td>
2380          <td class="md" valign="top">(&nbsp;</td>
2381          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2382          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2383          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2384          <td class="md" nowrap></td>
2385        </tr>
2386      </table>
2387    </td>
2388  </tr>
2389</table>
2390<table cellspacing="5" cellpadding="0" border="0">
2391  <tr>
2392    <td>
2393      &nbsp;
2394    </td>
2395    <td>
2396
2397<p>
2398Reset 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>
2399If 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>
2400If 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>&nbsp;</td><td>A decoder instance. </td></tr>
2404  </table>
2405</dl>
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>&nbsp;</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>
2411  </table>
2412</dl>
2413    </td>
2414  </tr>
2415</table>
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">
2418  <tr>
2419    <td class="mdRow">
2420      <table cellpadding="0" cellspacing="0" border="0">
2421        <tr>
2422          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_single           </td>
2423          <td class="md" valign="top">(&nbsp;</td>
2424          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2425          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2426          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2427          <td class="md" nowrap></td>
2428        </tr>
2429      </table>
2430    </td>
2431  </tr>
2432</table>
2433<table cellspacing="5" cellpadding="0" border="0">
2434  <tr>
2435    <td>
2436      &nbsp;
2437    </td>
2438    <td>
2439
2440<p>
2441Decode 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>
2442As 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>
2443Unless 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>&nbsp;</td><td>An initialized decoder instance. </td></tr>
2447  </table>
2448</dl>
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>&nbsp;</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>
2454  </table>
2455</dl>
2456    </td>
2457  </tr>
2458</table>
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">
2461  <tr>
2462    <td class="mdRow">
2463      <table cellpadding="0" cellspacing="0" border="0">
2464        <tr>
2465          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata           </td>
2466          <td class="md" valign="top">(&nbsp;</td>
2467          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2468          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2469          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2470          <td class="md" nowrap></td>
2471        </tr>
2472      </table>
2473    </td>
2474  </tr>
2475</table>
2476<table cellspacing="5" cellpadding="0" border="0">
2477  <tr>
2478    <td>
2479      &nbsp;
2480    </td>
2481    <td>
2482
2483<p>
2484Decode 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>
2485As 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>&nbsp;</td><td>An initialized decoder instance. </td></tr>
2489  </table>
2490</dl>
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>&nbsp;</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>
2496  </table>
2497</dl>
2498    </td>
2499  </tr>
2500</table>
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">
2503  <tr>
2504    <td class="mdRow">
2505      <table cellpadding="0" cellspacing="0" border="0">
2506        <tr>
2507          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_process_until_end_of_stream           </td>
2508          <td class="md" valign="top">(&nbsp;</td>
2509          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2510          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2511          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2512          <td class="md" nowrap></td>
2513        </tr>
2514      </table>
2515    </td>
2516  </tr>
2517</table>
2518<table cellspacing="5" cellpadding="0" border="0">
2519  <tr>
2520    <td>
2521      &nbsp;
2522    </td>
2523    <td>
2524
2525<p>
2526Decode 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>
2527As 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>&nbsp;</td><td>An initialized decoder instance. </td></tr>
2531  </table>
2532</dl>
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>&nbsp;</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>
2538  </table>
2539</dl>
2540    </td>
2541  </tr>
2542</table>
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">
2545  <tr>
2546    <td class="mdRow">
2547      <table cellpadding="0" cellspacing="0" border="0">
2548        <tr>
2549          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_skip_single_frame           </td>
2550          <td class="md" valign="top">(&nbsp;</td>
2551          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2552          <td class="mdname1" valign="top" nowrap> <em>decoder</em>          </td>
2553          <td class="md" valign="top">&nbsp;)&nbsp;</td>
2554          <td class="md" nowrap></td>
2555        </tr>
2556      </table>
2557    </td>
2558  </tr>
2559</table>
2560<table cellspacing="5" cellpadding="0" border="0">
2561  <tr>
2562    <td>
2563      &nbsp;
2564    </td>
2565    <td>
2566
2567<p>
2568Skip 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>
2569The 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>
2570This 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>
2571This 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>
2572This 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>&nbsp;</td><td>An initialized decoder instance not in a metadata state. </td></tr>
2576  </table>
2577</dl>
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>&nbsp;</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>
2583  </table>
2584</dl>
2585    </td>
2586  </tr>
2587</table>
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">
2590  <tr>
2591    <td class="mdRow">
2592      <table cellpadding="0" cellspacing="0" border="0">
2593        <tr>
2594          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_decoder_seek_absolute           </td>
2595          <td class="md" valign="top">(&nbsp;</td>
2596          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamDecoder.html">FLAC__StreamDecoder</a> *&nbsp;</td>
2597          <td class="mdname" nowrap> <em>decoder</em>, </td>
2598        </tr>
2599        <tr>
2600          <td class="md" nowrap align="right"></td>
2601          <td class="md"></td>
2602          <td class="md" nowrap>FLAC__uint64&nbsp;</td>
2603          <td class="mdname" nowrap> <em>sample</em></td>
2604        </tr>
2605        <tr>
2606          <td class="md"></td>
2607          <td class="md">)&nbsp;</td>
2608          <td class="md" colspan="2"></td>
2609        </tr>
2610      </table>
2611    </td>
2612  </tr>
2613</table>
2614<table cellspacing="5" cellpadding="0" border="0">
2615  <tr>
2616    <td>
2617      &nbsp;
2618    </td>
2619    <td>
2620
2621<p>
2622Flush 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>&nbsp;</td><td>A decoder instance. </td></tr>
2626    <tr><td valign="top"></td><td valign="top"><em>sample</em>&nbsp;</td><td>The target sample number to seek to. </td></tr>
2627  </table>
2628</dl>
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>&nbsp;</td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
2634  </table>
2635</dl>
2636    </td>
2637  </tr>
2638</table>
2639<hr><h2>Variable Documentation</h2>
2640<a class="anchor" name="ga0" doxytag="stream_decoder.h::FLAC__StreamDecoderStateString"></a><p>
2641<table class="mdTable" cellpadding="2" cellspacing="0">
2642  <tr>
2643    <td class="mdRow">
2644      <table cellpadding="0" cellspacing="0" border="0">
2645        <tr>
2646          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga0">FLAC__StreamDecoderStateString</a>[]          </td>
2647        </tr>
2648      </table>
2649    </td>
2650  </tr>
2651</table>
2652<table cellspacing="5" cellpadding="0" border="0">
2653  <tr>
2654    <td>
2655      &nbsp;
2656    </td>
2657    <td>
2658
2659<p>
2660Maps a FLAC__StreamDecoderState to a C string.<p>
2661Using a FLAC__StreamDecoderState as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2662  </tr>
2663</table>
2664<a class="anchor" name="ga1" doxytag="stream_decoder.h::FLAC__StreamDecoderInitStatusString"></a><p>
2665<table class="mdTable" cellpadding="2" cellspacing="0">
2666  <tr>
2667    <td class="mdRow">
2668      <table cellpadding="0" cellspacing="0" border="0">
2669        <tr>
2670          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga1">FLAC__StreamDecoderInitStatusString</a>[]          </td>
2671        </tr>
2672      </table>
2673    </td>
2674  </tr>
2675</table>
2676<table cellspacing="5" cellpadding="0" border="0">
2677  <tr>
2678    <td>
2679      &nbsp;
2680    </td>
2681    <td>
2682
2683<p>
2684Maps a FLAC__StreamDecoderInitStatus to a C string.<p>
2685Using a FLAC__StreamDecoderInitStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2686  </tr>
2687</table>
2688<a class="anchor" name="ga2" doxytag="stream_decoder.h::FLAC__StreamDecoderReadStatusString"></a><p>
2689<table class="mdTable" cellpadding="2" cellspacing="0">
2690  <tr>
2691    <td class="mdRow">
2692      <table cellpadding="0" cellspacing="0" border="0">
2693        <tr>
2694          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga2">FLAC__StreamDecoderReadStatusString</a>[]          </td>
2695        </tr>
2696      </table>
2697    </td>
2698  </tr>
2699</table>
2700<table cellspacing="5" cellpadding="0" border="0">
2701  <tr>
2702    <td>
2703      &nbsp;
2704    </td>
2705    <td>
2706
2707<p>
2708Maps a FLAC__StreamDecoderReadStatus to a C string.<p>
2709Using a FLAC__StreamDecoderReadStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2710  </tr>
2711</table>
2712<a class="anchor" name="ga3" doxytag="stream_decoder.h::FLAC__StreamDecoderSeekStatusString"></a><p>
2713<table class="mdTable" cellpadding="2" cellspacing="0">
2714  <tr>
2715    <td class="mdRow">
2716      <table cellpadding="0" cellspacing="0" border="0">
2717        <tr>
2718          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga3">FLAC__StreamDecoderSeekStatusString</a>[]          </td>
2719        </tr>
2720      </table>
2721    </td>
2722  </tr>
2723</table>
2724<table cellspacing="5" cellpadding="0" border="0">
2725  <tr>
2726    <td>
2727      &nbsp;
2728    </td>
2729    <td>
2730
2731<p>
2732Maps a FLAC__StreamDecoderSeekStatus to a C string.<p>
2733Using a FLAC__StreamDecoderSeekStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2734  </tr>
2735</table>
2736<a class="anchor" name="ga4" doxytag="stream_decoder.h::FLAC__StreamDecoderTellStatusString"></a><p>
2737<table class="mdTable" cellpadding="2" cellspacing="0">
2738  <tr>
2739    <td class="mdRow">
2740      <table cellpadding="0" cellspacing="0" border="0">
2741        <tr>
2742          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga4">FLAC__StreamDecoderTellStatusString</a>[]          </td>
2743        </tr>
2744      </table>
2745    </td>
2746  </tr>
2747</table>
2748<table cellspacing="5" cellpadding="0" border="0">
2749  <tr>
2750    <td>
2751      &nbsp;
2752    </td>
2753    <td>
2754
2755<p>
2756Maps a FLAC__StreamDecoderTellStatus to a C string.<p>
2757Using a FLAC__StreamDecoderTellStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2758  </tr>
2759</table>
2760<a class="anchor" name="ga5" doxytag="stream_decoder.h::FLAC__StreamDecoderLengthStatusString"></a><p>
2761<table class="mdTable" cellpadding="2" cellspacing="0">
2762  <tr>
2763    <td class="mdRow">
2764      <table cellpadding="0" cellspacing="0" border="0">
2765        <tr>
2766          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga5">FLAC__StreamDecoderLengthStatusString</a>[]          </td>
2767        </tr>
2768      </table>
2769    </td>
2770  </tr>
2771</table>
2772<table cellspacing="5" cellpadding="0" border="0">
2773  <tr>
2774    <td>
2775      &nbsp;
2776    </td>
2777    <td>
2778
2779<p>
2780Maps a FLAC__StreamDecoderLengthStatus to a C string.<p>
2781Using a FLAC__StreamDecoderLengthStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2782  </tr>
2783</table>
2784<a class="anchor" name="ga6" doxytag="stream_decoder.h::FLAC__StreamDecoderWriteStatusString"></a><p>
2785<table class="mdTable" cellpadding="2" cellspacing="0">
2786  <tr>
2787    <td class="mdRow">
2788      <table cellpadding="0" cellspacing="0" border="0">
2789        <tr>
2790          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga6">FLAC__StreamDecoderWriteStatusString</a>[]          </td>
2791        </tr>
2792      </table>
2793    </td>
2794  </tr>
2795</table>
2796<table cellspacing="5" cellpadding="0" border="0">
2797  <tr>
2798    <td>
2799      &nbsp;
2800    </td>
2801    <td>
2802
2803<p>
2804Maps a FLAC__StreamDecoderWriteStatus to a C string.<p>
2805Using a FLAC__StreamDecoderWriteStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2806  </tr>
2807</table>
2808<a class="anchor" name="ga7" doxytag="stream_decoder.h::FLAC__StreamDecoderErrorStatusString"></a><p>
2809<table class="mdTable" cellpadding="2" cellspacing="0">
2810  <tr>
2811    <td class="mdRow">
2812      <table cellpadding="0" cellspacing="0" border="0">
2813        <tr>
2814          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__decoder.html#ga7">FLAC__StreamDecoderErrorStatusString</a>[]          </td>
2815        </tr>
2816      </table>
2817    </td>
2818  </tr>
2819</table>
2820<table cellspacing="5" cellpadding="0" border="0">
2821  <tr>
2822    <td>
2823      &nbsp;
2824    </td>
2825    <td>
2826
2827<p>
2828Maps a FLAC__StreamDecoderErrorStatus to a C string.<p>
2829Using a FLAC__StreamDecoderErrorStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
2830  </tr>
2831</table>
2832
2833<hr size="1">
2834<div class="copyright">
2835	<!-- @@@ oh so hacky -->
2836	<table>
2837		<tr>
2838			<td align="left">
2839				Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
2840			</td>
2841			<td width="1%" align="right">
2842				<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
2843			</td>
2844		</tr>
2845	</table>
2846</div>
2847<!-- Copyright (c)  2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
2848<!-- Permission is granted to copy, distribute and/or modify this document -->
2849<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
2850<!-- or any later version published by the Free Software Foundation; -->
2851<!-- with no invariant sections. -->
2852<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
2853</body>
2854</html>
2855