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