load_flac.c
changeset 436 8ec227cabdd4
parent 386 695494546b3c
child 470 5cebd6c5be2d
     1.1 --- a/load_flac.c	Sat Oct 10 09:58:24 2009 +0000
     1.2 +++ b/load_flac.c	Sat Oct 10 10:23:03 2009 +0000
     1.3 @@ -50,7 +50,8 @@
     1.4  									const FLAC__StreamDecoder *decoder,
     1.5  									FLAC__byte buffer[],
     1.6  									size_t *bytes,
     1.7 -									void *client_data) {
     1.8 +									void *client_data)
     1.9 +{
    1.10  	// make sure there is something to be reading
    1.11  	if (*bytes > 0) {
    1.12  		FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.13 @@ -76,7 +77,8 @@
    1.14  static FLAC__StreamDecoderSeekStatus flac_seek_load_cb(
    1.15  									const FLAC__StreamDecoder *decoder,
    1.16  									FLAC__uint64 absolute_byte_offset,
    1.17 -									void *client_data) {
    1.18 +									void *client_data)
    1.19 +{
    1.20  	FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.21  
    1.22  	if (SDL_RWseek (data->sdl_src, absolute_byte_offset, SEEK_SET) < 0) {
    1.23 @@ -90,7 +92,8 @@
    1.24  static FLAC__StreamDecoderTellStatus flac_tell_load_cb(
    1.25  									const FLAC__StreamDecoder *decoder,
    1.26  									FLAC__uint64 *absolute_byte_offset,
    1.27 -									void *client_data) {
    1.28 +									void *client_data)
    1.29 +{
    1.30  	FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.31  
    1.32  	int pos = SDL_RWtell (data->sdl_src);
    1.33 @@ -107,7 +110,8 @@
    1.34  static FLAC__StreamDecoderLengthStatus flac_length_load_cb(
    1.35  									const FLAC__StreamDecoder *decoder,
    1.36  									FLAC__uint64 *stream_length,
    1.37 -									void *client_data) {
    1.38 +									void *client_data)
    1.39 +{
    1.40  	FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.41  
    1.42  	int pos = SDL_RWtell (data->sdl_src);
    1.43 @@ -125,7 +129,8 @@
    1.44  }
    1.45  
    1.46  static FLAC__bool flac_eof_load_cb(const FLAC__StreamDecoder *decoder,
    1.47 -									void *client_data) {
    1.48 +									void *client_data)
    1.49 +{
    1.50  	FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.51  
    1.52  	int pos = SDL_RWtell (data->sdl_src);
    1.53 @@ -148,9 +153,11 @@
    1.54  									const FLAC__StreamDecoder *decoder,
    1.55  									const FLAC__Frame *frame,
    1.56  									const FLAC__int32 *const buffer[],
    1.57 -									void *client_data) {
    1.58 +									void *client_data)
    1.59 +{
    1.60  	FLAC_SDL_Data *data = (FLAC_SDL_Data *)client_data;
    1.61  	size_t i;
    1.62 +	Uint8 *buf;
    1.63  
    1.64  	if (data->flac_total_samples == 0) {
    1.65  		SDL_SetError ("Given FLAC file does not specify its sample count.");
    1.66 @@ -176,7 +183,7 @@
    1.67      	}
    1.68  	}
    1.69  
    1.70 -	Uint8 *buf = *(data->sdl_audio_buf);
    1.71 +	buf = *(data->sdl_audio_buf);
    1.72  
    1.73  	for (i = 0; i < frame->header.blocksize; i++) {
    1.74  		FLAC__int16 i16;