music_flac.h
changeset 521 565549e046b0
parent 518 8bc9b5fd2aae
child 542 3de4970b36d4
equal deleted inserted replaced
520:61a1516bc06a 521:565549e046b0
    50 	int volume;
    50 	int volume;
    51 	int section;
    51 	int section;
    52 	FLAC__StreamDecoder *flac_decoder;
    52 	FLAC__StreamDecoder *flac_decoder;
    53 	FLAC_Data flac_data;
    53 	FLAC_Data flac_data;
    54 	SDL_RWops *rwops;
    54 	SDL_RWops *rwops;
       
    55 	int freerw;
    55 	SDL_AudioCVT cvt;
    56 	SDL_AudioCVT cvt;
    56 	int len_available;
    57 	int len_available;
    57 	Uint8 *snd_available;
    58 	Uint8 *snd_available;
    58 } FLAC_music;
    59 } FLAC_music;
    59 
    60 
    67 
    68 
    68 /* Load a FLAC stream from the given file */
    69 /* Load a FLAC stream from the given file */
    69 extern FLAC_music *FLAC_new(const char *file);
    70 extern FLAC_music *FLAC_new(const char *file);
    70 
    71 
    71 /* Load an FLAC stream from an SDL_RWops object */
    72 /* Load an FLAC stream from an SDL_RWops object */
    72 extern FLAC_music *FLAC_new_RW(SDL_RWops *rw);
    73 extern FLAC_music *FLAC_new_RW(SDL_RWops *rw, int freerw);
    73 
    74 
    74 /* Start playback of a given FLAC stream */
    75 /* Start playback of a given FLAC stream */
    75 extern void FLAC_play(FLAC_music *music);
    76 extern void FLAC_play(FLAC_music *music);
    76 
    77 
    77 /* Return non-zero if a stream is currently playing */
    78 /* Return non-zero if a stream is currently playing */