mixer.c
changeset 382 50501e45c57b
parent 373 6271eafc6e70
child 383 0d05ac848d6a
     1.1 --- a/mixer.c	Tue Feb 26 11:46:22 2008 +0000
     1.2 +++ b/mixer.c	Wed Feb 27 07:31:03 2008 +0000
     1.3 @@ -34,6 +34,7 @@
     1.4  #include "load_aiff.h"
     1.5  #include "load_voc.h"
     1.6  #include "load_ogg.h"
     1.7 +#include "load_flac.h"
     1.8  
     1.9  #define __MIX_INTERNAL_EFFECT__
    1.10  #include "effects_internal.h"
    1.11 @@ -43,7 +44,8 @@
    1.12  #define WAVE		0x45564157		/* "WAVE" */
    1.13  #define FORM		0x4d524f46		/* "FORM" */
    1.14  #define OGGS		0x5367674f		/* "OggS" */
    1.15 -#define CREA	    	0x61657243		/* "Crea" */
    1.16 +#define CREA		0x61657243		/* "Crea" */
    1.17 +#define FLAC		0x43614C66		/* "fLaC" */
    1.18  
    1.19  static int audio_opened = 0;
    1.20  static SDL_AudioSpec mixer;
    1.21 @@ -455,6 +457,12 @@
    1.22  					(Uint8 **)&chunk->abuf, &chunk->alen);
    1.23  			break;
    1.24  #endif
    1.25 +#ifdef FLAC_MUSIC
    1.26 +		case FLAC:
    1.27 +			loaded = Mix_LoadFLAC_RW(src, freesrc, &wavespec,
    1.28 +					(Uint8 **)&chunk->abuf, &chunk->alen);
    1.29 +			break;
    1.30 +#endif
    1.31  		case CREA:
    1.32  			loaded = Mix_LoadVOC_RW(src, freesrc, &wavespec,
    1.33  					(Uint8 **)&chunk->abuf, &chunk->alen);