dynamic_flac.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 19 Oct 2009 01:03:40 +0000
changeset 462 028b317d01d2
parent 386 695494546b3c
child 470 5cebd6c5be2d
permissions -rw-r--r--
Added the AudioUnit framework for the native MIDI code.
slouken@382
     1
/*
slouken@382
     2
    SDL_mixer:  An audio mixer library based on the SDL library
slouken@386
     3
    Copyright (C) 1997-2009 Sam Lantinga
slouken@382
     4
slouken@382
     5
    This library is free software; you can redistribute it and/or
slouken@382
     6
    modify it under the terms of the GNU Library General Public
slouken@382
     7
    License as published by the Free Software Foundation; either
slouken@382
     8
    version 2 of the License, or (at your option) any later version.
slouken@382
     9
slouken@382
    10
    This library is distributed in the hope that it will be useful,
slouken@382
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@382
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@382
    13
    Library General Public License for more details.
slouken@382
    14
slouken@382
    15
    You should have received a copy of the GNU Library General Public
slouken@382
    16
    License along with this library; if not, write to the Free
slouken@382
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@382
    18
slouken@382
    19
    Sam Lantinga
slouken@382
    20
    slouken@libsdl.org
slouken@382
    21
slouken@382
    22
slouken@382
    23
    The following file defines all of the functions/objects used to dynamically
slouken@382
    24
    link to the libFLAC library.
slouken@382
    25
    										~ Austen Dicken (admin@cvpcs.org)
slouken@382
    26
*/
slouken@382
    27
slouken@382
    28
#ifdef FLAC_MUSIC
slouken@382
    29
slouken@382
    30
#include <FLAC/stream_decoder.h>
slouken@382
    31
slouken@382
    32
typedef struct {
slouken@382
    33
	int loaded;
slouken@382
    34
	void *handle;
slouken@382
    35
	FLAC__StreamDecoder *(*FLAC__stream_decoder_new)();
slouken@382
    36
	void (*FLAC__stream_decoder_delete)(FLAC__StreamDecoder *decoder);
slouken@382
    37
	FLAC__StreamDecoderInitStatus (*FLAC__stream_decoder_init_stream)(
slouken@382
    38
						FLAC__StreamDecoder *decoder,
slouken@382
    39
						FLAC__StreamDecoderReadCallback read_callback,
slouken@382
    40
						FLAC__StreamDecoderSeekCallback seek_callback,
slouken@382
    41
						FLAC__StreamDecoderTellCallback tell_callback,
slouken@382
    42
						FLAC__StreamDecoderLengthCallback length_callback,
slouken@382
    43
						FLAC__StreamDecoderEofCallback eof_callback,
slouken@382
    44
						FLAC__StreamDecoderWriteCallback write_callback,
slouken@382
    45
						FLAC__StreamDecoderMetadataCallback metadata_callback,
slouken@382
    46
						FLAC__StreamDecoderErrorCallback error_callback,
slouken@382
    47
						void *client_data);
slouken@382
    48
	FLAC__bool (*FLAC__stream_decoder_finish)(FLAC__StreamDecoder *decoder);
slouken@382
    49
	FLAC__bool (*FLAC__stream_decoder_flush)(FLAC__StreamDecoder *decoder);
slouken@382
    50
	FLAC__bool (*FLAC__stream_decoder_process_single)(
slouken@382
    51
						FLAC__StreamDecoder *decoder);
slouken@382
    52
	FLAC__bool (*FLAC__stream_decoder_process_until_end_of_metadata)(
slouken@382
    53
						FLAC__StreamDecoder *decoder);
slouken@382
    54
	FLAC__bool (*FLAC__stream_decoder_process_until_end_of_stream)(
slouken@382
    55
						FLAC__StreamDecoder *decoder);
slouken@382
    56
	FLAC__bool (*FLAC__stream_decoder_seek_absolute)(
slouken@382
    57
						FLAC__StreamDecoder *decoder,
slouken@382
    58
						FLAC__uint64 sample);
slouken@382
    59
	FLAC__StreamDecoderState (*FLAC__stream_decoder_get_state)(
slouken@382
    60
						const FLAC__StreamDecoder *decoder);
slouken@382
    61
} flac_loader;
slouken@382
    62
slouken@382
    63
extern flac_loader flac;
slouken@382
    64
slouken@382
    65
extern int Mix_InitFLAC();
slouken@382
    66
extern void Mix_QuitFLAC();
slouken@382
    67
slouken@382
    68
#endif // FLAC_MUSIC