minor formatting
[platform/upstream/flac.git] / include / FLAC / file_decoder.h
1 /* libFLAC - Free Lossless Audio Codec library
2  * Copyright (C) 2000,2001,2002  Josh Coalson
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA  02111-1307, USA.
18  */
19
20 #ifndef FLAC__FILE_DECODER_H
21 #define FLAC__FILE_DECODER_H
22
23 #include "seekable_stream_decoder.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29
30 /** \file include/FLAC/file_decoder.h
31  *
32  *  \brief
33  *  This module contains the functions which implement the file
34  *  decoder.
35  *
36  *  See the detailed documentation in the
37  *  \link flac_file_decoder file decoder \endlink module.
38  */
39
40 /** \defgroup flac_file_decoder FLAC/file_decoder.h: file decoder interface
41  *  \ingroup flac_decoder
42  *
43  *  \brief
44  *  This module contains the functions which implement the file
45  *  decoder.
46  *
47  * The basic usage of this decoder is as follows:
48  * - The program creates an instance of a decoder using
49  *   FLAC__file_decoder_new().
50  * - The program overrides the default settings and sets callbacks for
51  *   writing, error reporting, and metadata reporting using
52  *   FLAC__file_decoder_set_*() functions.
53  * - The program initializes the instance to validate the settings and
54  *   prepare for decoding using FLAC__file_decoder_init().
55  * - The program calls the FLAC__file_decoder_process_*() functions
56  *   to decode data, which subsequently calls the callbacks.
57  * - The program finishes the decoding with FLAC__file_decoder_finish(),
58  *   which flushes the input and output and resets the decoder to the
59  *   uninitialized state.
60  * - The instance may be used again or deleted with
61  *   FLAC__file_decoder_delete().
62  *
63  * The file decoder is a trivial wrapper around the
64  * \link flac_seekable_stream_decoder seekable stream decoder \endlink
65  * meant to simplfy the process of decoding from a standard file.  The
66  * file decoder supplies all but the Write/Metadata/Error callbacks.
67  * The user needs only to provide the path to the file and the file
68  * decoder handles the rest.
69  *
70  * Like the seekable stream decoder, seeking is exposed through the
71  * FLAC__file_decoder_seek_absolute() method.  At any point after the file
72  * decoder has been initialized, the user can call this function to seek to
73  * an exact sample within the file.  Subsequently, the first time the write
74  * callback is called it will be passed a (possibly partial) block starting
75  * at that sample.
76  *
77  * The file decoder also inherits MD5 signature checking from the seekable
78  * stream decoder.  If this is turned on before initialization,
79  * FLAC__file_decoder_finish() will report when the decoded MD5 signature
80  * does not match the one stored in the STREAMINFO block.  MD5 checking is
81  * automatically turned off if there is no signature in the STREAMINFO
82  * block or when a seek is attempted.
83  *
84  * Make sure to read the detailed descriptions of the
85  * \link flac_seekable_stream_decoder seekable stream decoder module \endlink
86  * and \link flac_stream_decoder stream decoder module \endlink
87  * since the file decoder inherits much of its behavior from them.
88  *
89  * \note
90  * The "set" functions may only be called when the decoder is in the
91  * state FLAC__FILE_DECODER_UNINITIALIZED, i.e. after
92  * FLAC__file_decoder_new() or FLAC__file_decoder_finish(), but
93  * before FLAC__file_decoder_init().  If this is the case they will
94  * return \c true, otherwise \c false.
95  *
96  * \note
97  * FLAC__file_decoder_finish() resets all settings to the constructor
98  * defaults, including the callbacks.
99  *
100  * \{
101  */
102
103
104 /** State values for a FLAC__FileDecoder
105  *
106  *  The decoder's state can be obtained by calling FLAC__file_decoder_get_state().
107  */
108 typedef enum {
109
110         FLAC__FILE_DECODER_OK = 0,
111         /**< The decoder is in the normal OK state. */
112
113         FLAC__FILE_DECODER_END_OF_FILE,
114         /**< The decoder has reached the end of the file. */
115
116         FLAC__FILE_DECODER_ERROR_OPENING_FILE,
117         /**< An error occurred opening the input file. */
118
119         FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR,
120         /**< An error occurred allocating memory. */
121
122         FLAC__FILE_DECODER_SEEK_ERROR,
123         /**< An error occurred while seeking. */
124
125         FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR,
126         /**< An error occurred in the underlying seekable stream decoder. */
127
128         FLAC__FILE_DECODER_ALREADY_INITIALIZED,
129         /**< FLAC__file_decoder_init() was called when the decoder was already
130          * initialized, usually because FLAC__file_decoder_finish() was not
131          * called.
132          */
133
134         FLAC__FILE_DECODER_INVALID_CALLBACK,
135         /**< FLAC__file_decoder_init() was called without all callbacks
136          * being set.
137          */
138
139         FLAC__FILE_DECODER_UNINITIALIZED
140         /**< The decoder is in the uninitialized state. */
141
142 } FLAC__FileDecoderState;
143
144 /** Maps a FLAC__FileDecoderState to a C string.
145  *
146  *  Using a FLAC__FileDecoderState as the index to this array
147  *  will give the string equivalent.  The contents should not be modified.
148  */
149 extern const char * const FLAC__FileDecoderStateString[];
150
151
152 /***********************************************************************
153  *
154  * class FLAC__FileDecoder : public FLAC__StreamDecoder
155  *
156  ***********************************************************************/
157
158 struct FLAC__FileDecoderProtected;
159 struct FLAC__FileDecoderPrivate;
160 /** The opaque structure definition for the file decoder type.  See the
161  *  \link flac_file_decoder file decoder module \endlink for a detailed
162  *  description.
163  */
164 typedef struct {
165         struct FLAC__FileDecoderProtected *protected_; /* avoid the C++ keyword 'protected' */
166         struct FLAC__FileDecoderPrivate *private_; /* avoid the C++ keyword 'private' */
167 } FLAC__FileDecoder;
168
169 /** Signature for the write callback.
170  *  See FLAC__file_decoder_set_write_callback()
171  *  and FLAC__SeekableStreamDecoderWriteCallback for more info.
172  *
173  * \param  decoder  The decoder instance calling the callback.
174  * \param  frame    The description of the decoded frame.
175  * \param  buffer   An array of pointers to decoded channels of data.
176  * \param  client_data  The callee's client data set through
177  *                      FLAC__file_decoder_set_client_data().
178  * \retval FLAC__StreamDecoderWriteStatus
179  *    The callee's return status.
180  */
181 typedef FLAC__StreamDecoderWriteStatus (*FLAC__FileDecoderWriteCallback)(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
182
183 /** Signature for the metadata callback.
184  *  See FLAC__file_decoder_set_metadata_callback()
185  *  and FLAC__SeekableStreamDecoderMetadataCallback for more info.
186  *
187  * \param  decoder  The decoder instance calling the callback.
188  * \param  metadata The decoded metadata block.
189  * \param  client_data  The callee's client data set through
190  *                      FLAC__file_decoder_set_client_data().
191  */
192 typedef void (*FLAC__FileDecoderMetadataCallback)(const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
193
194 /** Signature for the error callback.
195  *  See FLAC__file_decoder_set_error_callback()
196  *  and FLAC__SeekableStreamDecoderErrorCallback for more info.
197  *
198  * \param  decoder  The decoder instance calling the callback.
199  * \param  status   The error encountered by the decoder.
200  * \param  client_data  The callee's client data set through
201  *                      FLAC__file_decoder_set_client_data().
202  */
203 typedef void (*FLAC__FileDecoderErrorCallback)(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
204
205
206 /***********************************************************************
207  *
208  * Class constructor/destructor
209  *
210  ***********************************************************************/
211
212 /** Create a new file decoder instance.  The instance is created with
213  *  default settings; see the individual FLAC__file_decoder_set_*()
214  *  functions for each setting's default.
215  *
216  * \retval FLAC__FileDecoder*
217  *    \c NULL if there was an error allocating memory, else the new instance.
218  */
219 FLAC__FileDecoder *FLAC__file_decoder_new();
220
221 /** Free a decoder instance.  Deletes the object pointed to by \a decoder.
222  *
223  * \param decoder  A pointer to an existing decoder.
224  * \assert
225  *    \code decoder != NULL \endcode
226  */
227 void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder);
228
229
230 /***********************************************************************
231  *
232  * Public class method prototypes
233  *
234  ***********************************************************************/
235
236 /** Set the "MD5 signature checking" flag.
237  *  This is inherited from FLAC__SeekableStreamDecoder; see
238  *  FLAC__seekable_stream_decoder_set_md5_checking().
239  *
240  * \default \c false
241  * \param  decoder  A decoder instance to set.
242  * \param  value    See above.
243  * \assert
244  *    \code decoder != NULL \endcode
245  * \retval FLAC__bool
246  *    \c false if the decoder is already initialized, else \c true.
247  */
248 FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value);
249
250 /** Set the input file name to decode.
251  *
252  * \default \c "-"
253  * \param  decoder  A decoder instance to set.
254  * \param  value    The input file name, or "-" for \c stdin.
255  * \assert
256  *    \code decoder != NULL \endcode
257  *    \code value != NULL \endcode
258  * \retval FLAC__bool
259  *    \c false if the decoder is already initialized, or there was a memory
260  *    allocation error, else \c true.
261  */
262 FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value);
263
264 /** Set the write callback.
265  *  This is inherited from FLAC__SeekableStreamDecoder; see
266  *  FLAC__seekable_stream_decoder_set_write_callback().
267  *
268  * \note
269  * The callback is mandatory and must be set before initialization.
270  *
271  * \default \c NULL
272  * \param  decoder  A decoder instance to set.
273  * \param  value    See above.
274  * \assert
275  *    \code decoder != NULL \endcode
276  *    \code value != NULL \endcode
277  * \retval FLAC__bool
278  *    \c false if the decoder is already initialized, else \c true.
279  */
280 FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderWriteCallback value);
281
282 /** Set the metadata callback.
283  *  This is inherited from FLAC__SeekableStreamDecoder; see
284  *  FLAC__seekable_stream_decoder_set_metadata_callback().
285  *
286  * \note
287  * The callback is mandatory and must be set before initialization.
288  *
289  * \default \c NULL
290  * \param  decoder  A decoder instance to set.
291  * \param  value    See above.
292  * \assert
293  *    \code decoder != NULL \endcode
294  *    \code value != NULL \endcode
295  * \retval FLAC__bool
296  *    \c false if the decoder is already initialized, else \c true.
297  */
298 FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderMetadataCallback value);
299
300 /** Set the error callback.
301  *  This is inherited from FLAC__SeekableStreamDecoder; see
302  *  FLAC__seekable_stream_decoder_set_error_callback().
303  *
304  * \note
305  * The callback is mandatory and must be set before initialization.
306  *
307  * \default \c NULL
308  * \param  decoder  A decoder instance to set.
309  * \param  value    See above.
310  * \assert
311  *    \code decoder != NULL \endcode
312  *    \code value != NULL \endcode
313  * \retval FLAC__bool
314  *    \c false if the decoder is already initialized, else \c true.
315  */
316 FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderErrorCallback value);
317
318 /** Set the client data to be passed back to callbacks.
319  *  This value will be supplied to callbacks in their \a client_data
320  *  argument.
321  *
322  * \default \c NULL
323  * \param  decoder  An decoder instance to set.
324  * \param  value    See above.
325  * \assert
326  *    \code decoder != NULL \endcode
327  * \retval FLAC__bool
328  *    \c false if the decoder is already initialized, else \c true.
329  */
330 FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value);
331
332 /** This is inherited from FLAC__SeekableStreamDecoder; see
333  *  FLAC__seekable_stream_decoder_set_metadata_respond().
334  *
335  * \default By default, only the \c STREAMINFO block is returned via the
336  *          metadata callback.
337  * \param  decoder  A decoder instance to set.
338  * \param  type     See above.
339  * \assert
340  *    \code decoder != NULL \endcode
341  *    \a type is valid
342  * \retval FLAC__bool
343  *    \c false if the decoder is already initialized, else \c true.
344  */
345 FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, FLAC__MetadataType type);
346
347 /** This is inherited from FLAC__SeekableStreamDecoder; see
348  *  FLAC__seekable_stream_decoder_set_metadata_respond_application().
349  *
350  * \default By default, only the \c STREAMINFO block is returned via the
351  *          metadata callback.
352  * \param  decoder  A decoder instance to set.
353  * \param  id       See above.
354  * \assert
355  *    \code decoder != NULL \endcode
356  *    \code id != NULL \endcode
357  * \retval FLAC__bool
358  *    \c false if the decoder is already initialized, else \c true.
359  */
360 FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]);
361
362 /** This is inherited from FLAC__SeekableStreamDecoder; see
363  *  FLAC__seekable_stream_decoder_set_metadata_respond_all().
364  *
365  * \default By default, only the \c STREAMINFO block is returned via the
366  *          metadata callback.
367  * \param  decoder  A decoder instance to set.
368  * \assert
369  *    \code decoder != NULL \endcode
370  * \retval FLAC__bool
371  *    \c false if the decoder is already initialized, else \c true.
372  */
373 FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decoder);
374
375 /** This is inherited from FLAC__SeekableStreamDecoder; see
376  *  FLAC__seekable_stream_decoder_set_metadata_ignore().
377  *
378  * \default By default, only the \c STREAMINFO block is returned via the
379  *          metadata callback.
380  * \param  decoder  A decoder instance to set.
381  * \param  type     See above.
382  * \assert
383  *    \code decoder != NULL \endcode
384  *    \a type is valid
385  * \retval FLAC__bool
386  *    \c false if the decoder is already initialized, else \c true.
387  */
388 FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FLAC__MetadataType type);
389
390 /** This is inherited from FLAC__SeekableStreamDecoder; see
391  *  FLAC__seekable_stream_decoder_set_metadata_ignore_application().
392  *
393  * \default By default, only the \c STREAMINFO block is returned via the
394  *          metadata callback.
395  * \param  decoder  A decoder instance to set.
396  * \param  id       See above.
397  * \assert
398  *    \code decoder != NULL \endcode
399  *    \code id != NULL \endcode
400  * \retval FLAC__bool
401  *    \c false if the decoder is already initialized, else \c true.
402  */
403 FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]);
404
405 /** This is inherited from FLAC__SeekableStreamDecoder; see
406  *  FLAC__seekable_stream_decoder_set_metadata_ignore_all().
407  *
408  * \default By default, only the \c STREAMINFO block is returned via the
409  *          metadata callback.
410  * \param  decoder  A decoder instance to set.
411  * \assert
412  *    \code decoder != NULL \endcode
413  * \retval FLAC__bool
414  *    \c false if the decoder is already initialized, else \c true.
415  */
416 FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder);
417
418 /** Get the current decoder state.
419  *
420  * \param  decoder  A decoder instance to query.
421  * \assert
422  *    \code decoder != NULL \endcode
423  * \retval FLAC__FileDecoderState
424  *    The current decoder state.
425  */
426 FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder);
427
428 /** Get the state of the underlying seekable stream decoder.
429  *  Useful when the file decoder state is
430  *  \c FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR.
431  *
432  * \param  decoder  An decoder instance to query.
433  * \assert
434  *    \code decoder != NULL \endcode
435  * \retval FLAC__SeekableStreamDecoderState
436  *    The seekable stream decoder state.
437  */
438 FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_state(const FLAC__FileDecoder *decoder);
439
440 /** Get the state of the underlying stream decoder.
441  *  Useful when the file decoder state is
442  *  \c FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR and the seekable stream
443  *  decoder state is \c FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR.
444  *
445  * \param  decoder  An decoder instance to query.
446  * \assert
447  *    \code decoder != NULL \endcode
448  * \retval FLAC__StreamDecoderState
449  *    The seekable stream decoder state.
450  */
451 FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder);
452
453 /** Get the "MD5 signature checking" flag.
454  *  This is inherited from FLAC__SeekableStreamDecoder; see
455  *  FLAC__seekable_stream_decoder_get_md5_checking().
456  *
457  * \param  decoder  A decoder instance to query.
458  * \assert
459  *    \code decoder != NULL \endcode
460  * \retval FLAC__bool
461  *    See above.
462  */
463 FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder);
464
465 /** This is inherited from FLAC__SeekableStreamDecoder; see
466  *  FLAC__seekable_stream_decoder_get_channels().
467  *
468  * \param  decoder  A decoder instance to query.
469  * \assert
470  *    \code decoder != NULL \endcode
471  * \retval unsigned
472  *    See above.
473  */
474 unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder);
475
476 /** This is inherited from FLAC__SeekableStreamDecoder; see
477  *  FLAC__seekable_stream_decoder_get_channel_assignment().
478  *
479  * \param  decoder  A decoder instance to query.
480  * \assert
481  *    \code decoder != NULL \endcode
482  * \retval FLAC__ChannelAssignment
483  *    See above.
484  */
485 FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__FileDecoder *decoder);
486
487 /** This is inherited from FLAC__SeekableStreamDecoder; see
488  *  FLAC__seekable_stream_decoder_get_bits_per_sample().
489  *
490  * \param  decoder  A decoder instance to query.
491  * \assert
492  *    \code decoder != NULL \endcode
493  * \retval unsigned
494  *    See above.
495  */
496 unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder);
497
498 /** This is inherited from FLAC__SeekableStreamDecoder; see
499  *  FLAC__seekable_stream_decoder_get_sample_rate().
500  *
501  * \param  decoder  A decoder instance to query.
502  * \assert
503  *    \code decoder != NULL \endcode
504  * \retval unsigned
505  *    See above.
506  */
507 unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder);
508
509 /** This is inherited from FLAC__SeekableStreamDecoder; see
510  *  FLAC__seekable_stream_decoder_get_blocksize().
511  *
512  * \param  decoder  A decoder instance to query.
513  * \assert
514  *    \code decoder != NULL \endcode
515  * \retval unsigned
516  *    See above.
517  */
518 unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder);
519
520 /** Initialize the decoder instance.
521  *  Should be called after FLAC__file_decoder_new() and
522  *  FLAC__file_decoder_set_*() but before any of the
523  *  FLAC__file_decoder_process_*() functions.  Will set and return
524  *  the decoder state, which will be FLAC__FILE_DECODER_OK if
525  *  initialization succeeded.
526  *
527  * \param  decoder  An uninitialized decoder instance.
528  * \assert
529  *    \code decoder != NULL \endcode
530  * \retval FLAC__FileDecoderState
531  *    \c FLAC__FILE_DECODER_OK if initialization was successful; see
532  *    FLAC__FileDecoderState for the meanings of other return values.
533  */
534 FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder);
535
536 /** Finish the decoding process.
537  *  Flushes the decoding buffer, releases resources, resets the decoder
538  *  settings to their defaults, and returns the decoder state to
539  *  FLAC__FILE_DECODER_UNINITIALIZED.
540  *
541  *  In the event of a prematurely-terminated decode, it is not strictly
542  *  necessary to call this immediately before FLAC__file_decoder_delete()
543  *  but it is good practice to match every FLAC__file_decoder_init() with
544  *  a FLAC__file_decoder_finish().
545  *
546  * \param  decoder  An uninitialized decoder instance.
547  * \assert
548  *    \code decoder != NULL \endcode
549  * \retval FLAC__bool
550  *    \c false if MD5 checking is on AND a STREAMINFO block was available
551  *    AND the MD5 signature in the STREAMINFO block was non-zero AND the
552  *    signature does not match the one computed by the decoder; else
553  *    \c true.
554  */
555 FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder);
556
557 /** This is inherited from FLAC__SeekableStreamDecoder; see
558  *  FLAC__seekable_stream_decoder_process_single().
559  *
560  * \param  decoder  A decoder instance.
561  * \assert
562  *    \code decoder != NULL \endcode
563  * \retval FLAC__bool
564  *    See above.
565  */
566 FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder);
567
568 /** This is inherited from FLAC__SeekableStreamDecoder; see
569  *  FLAC__seekable_stream_decoder_process_until_end_of_metadata().
570  *
571  * \param  decoder  A decoder instance.
572  * \assert
573  *    \code decoder != NULL \endcode
574  * \retval FLAC__bool
575  *    See above.
576  */
577 FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *decoder);
578
579 /** This is inherited from FLAC__SeekableStreamDecoder; see
580  *  FLAC__seekable_stream_decoder_process_until_end_of_stream().
581  *
582  * \param  decoder  A decoder instance.
583  * \assert
584  *    \code decoder != NULL \endcode
585  * \retval FLAC__bool
586  *    See above.
587  */
588 FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decoder);
589
590 /** This is inherited from FLAC__SeekableStreamDecoder; see
591  *  FLAC__seekable_stream_decoder_process_remaining_frames().
592  *
593  * \param  decoder  A decoder instance.
594  * \assert
595  *    \code decoder != NULL \endcode
596  * \retval FLAC__bool
597  *    See above.
598  */
599 FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decoder);
600
601 /** Flush the input and seek to an absolute sample.
602  *  This is inherited from FLAC__SeekableStreamDecoder; see
603  *  FLAC__seekable_stream_decoder_seek_absolute().
604  *
605  * \param  decoder  A decoder instance.
606  * \param  sample   The target sample number to seek to.
607  * \assert
608  *    \code decoder != NULL \endcode
609  * \retval FLAC__bool
610  *    \c true if successful, else \c false.
611  */
612 FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample);
613
614 /* \} */
615
616 #ifdef __cplusplus
617 }
618 #endif
619
620 #endif