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