dynamic_flac.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 31 Dec 2011 10:27:48 -0500
changeset 518 8bc9b5fd2aae
parent 470 5cebd6c5be2d
child 601 05123263dab3
permissions -rw-r--r--
Happy New Year!
slouken@382
     1
/*
slouken@518
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@518
     3
  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
slouken@382
     4
slouken@518
     5
  This software is provided 'as-is', without any express or implied
slouken@518
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@518
     7
  arising from the use of this software.
slouken@382
     8
slouken@518
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@518
    10
  including commercial applications, and to alter it and redistribute it
slouken@518
    11
  freely, subject to the following restrictions:
slouken@382
    12
slouken@518
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@518
    14
     claim that you wrote the original software. If you use this software
slouken@518
    15
     in a product, an acknowledgment in the product documentation would be
slouken@518
    16
     appreciated but is not required.
slouken@518
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@518
    18
     misrepresented as being the original software.
slouken@518
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@382
    20
slouken@518
    21
  The following file defines all of the functions/objects used to dynamically
slouken@518
    22
  link to the libFLAC library.
slouken@518
    23
  	~ Austen Dicken (admin@cvpcs.org)
slouken@382
    24
*/
slouken@382
    25
slouken@382
    26
#ifdef FLAC_MUSIC
slouken@382
    27
slouken@382
    28
#include <FLAC/stream_decoder.h>
slouken@382
    29
slouken@382
    30
typedef struct {
slouken@382
    31
	int loaded;
slouken@382
    32
	void *handle;
slouken@382
    33
	FLAC__StreamDecoder *(*FLAC__stream_decoder_new)();
slouken@382
    34
	void (*FLAC__stream_decoder_delete)(FLAC__StreamDecoder *decoder);
slouken@382
    35
	FLAC__StreamDecoderInitStatus (*FLAC__stream_decoder_init_stream)(
slouken@382
    36
						FLAC__StreamDecoder *decoder,
slouken@382
    37
						FLAC__StreamDecoderReadCallback read_callback,
slouken@382
    38
						FLAC__StreamDecoderSeekCallback seek_callback,
slouken@382
    39
						FLAC__StreamDecoderTellCallback tell_callback,
slouken@382
    40
						FLAC__StreamDecoderLengthCallback length_callback,
slouken@382
    41
						FLAC__StreamDecoderEofCallback eof_callback,
slouken@382
    42
						FLAC__StreamDecoderWriteCallback write_callback,
slouken@382
    43
						FLAC__StreamDecoderMetadataCallback metadata_callback,
slouken@382
    44
						FLAC__StreamDecoderErrorCallback error_callback,
slouken@382
    45
						void *client_data);
slouken@382
    46
	FLAC__bool (*FLAC__stream_decoder_finish)(FLAC__StreamDecoder *decoder);
slouken@382
    47
	FLAC__bool (*FLAC__stream_decoder_flush)(FLAC__StreamDecoder *decoder);
slouken@382
    48
	FLAC__bool (*FLAC__stream_decoder_process_single)(
slouken@382
    49
						FLAC__StreamDecoder *decoder);
slouken@382
    50
	FLAC__bool (*FLAC__stream_decoder_process_until_end_of_metadata)(
slouken@382
    51
						FLAC__StreamDecoder *decoder);
slouken@382
    52
	FLAC__bool (*FLAC__stream_decoder_process_until_end_of_stream)(
slouken@382
    53
						FLAC__StreamDecoder *decoder);
slouken@382
    54
	FLAC__bool (*FLAC__stream_decoder_seek_absolute)(
slouken@382
    55
						FLAC__StreamDecoder *decoder,
slouken@382
    56
						FLAC__uint64 sample);
slouken@382
    57
	FLAC__StreamDecoderState (*FLAC__stream_decoder_get_state)(
slouken@382
    58
						const FLAC__StreamDecoder *decoder);
slouken@382
    59
} flac_loader;
slouken@382
    60
slouken@382
    61
extern flac_loader flac;
slouken@382
    62
slouken@470
    63
#endif /* FLAC_MUSIC */
slouken@470
    64
slouken@382
    65
extern int Mix_InitFLAC();
slouken@382
    66
extern void Mix_QuitFLAC();