 WAVE from the data source, automatically freeing
 * that source if 'freesrc' is non-zero.  For example, to load a WAVE file,
 * you could do:
 *	SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1,...);
 *
 * If this function succeeds, it returns the given SDL_AudioSpec,
 * filled with the audio data format of the wave data, and sets
 * 'audio_buf' to a malloc()'d buffer containing the audio data,
 * and sets 'audio_len' to the length of that audio buffer, in bytes.
 * You need to free the audio buffer with SDL_FreeWAV() when you are 
 * done with it.
 *
 * This function returns NULL and sets the SDL error message if the 
 * wave file cannot be opened, uses an unknown data format, or is 
 * corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
 */
extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);

/* Compatibility convenience function -- loads a WAV from a file */
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
	SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)

/*
 * This function frees data previously allocated with SDL_LoadWAV_RW()
 */
extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf);

/*
 * This function takes a source format and rate and a destination format
 * and rate, and initializes the 'cvt' structure with information needed
 * by SDL_ConvertAudio() to convert a buffer of audio data from one format
 * to the other.
 * This function returns 0, or -1 if there was an error.
 */
extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
		Uint16 src_format, Uint8 src_channels, int src_rate,
	
WAVE from the data source, automatically freeing 
  * that generator if' freesrc' is non - zero.   For case, to load a WAVE file, 
  * you could do: 
  * 	 SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav ", " rb "), 1, ...); 
  * 
  * If this function succeeds, it render the given SDL_AudioSpec, 
  * filled with the audio datum format of the wave data, and sets 
  *' audio_buf' to a malloc()'d buffer incorporate the audio data, 
  * and set' audio_len' to the length of that sound recording buffer, in bytes. 
  * You need to free the audio buffer with SDL_FreeWAV () when you are 
  * done with it. 
  * 
  * This function come back NULL and sets the SDL error message if the 
  * wave file cannot be open, uses an unknown data format, or is 
  * corrupt.   presently raw and MS - ADPCM WAVE file are supported. 
  * / 
 extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, int freesrc, SDL_AudioSpec * spec, Uint8 * * audio_buf, Uint32 * audio_len); 

 / * Compatibility convenience function -- load a WAV from a file * / 
 # define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ 
	 SDL_LoadWAV_RW(SDL_RWFromFile(file, " rb"),1, spec, audio_buf, audio_len) 

 / * 
  * This function frees data previously allocate with SDL_LoadWAV_RW () 
  * / 
 extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf); 

 / * 
  * This affair takes a source format and rate and a destination format 
  * and rate, and initializes the' cvt' structure with information needed 
  * by SDL_ConvertAudio () to change a buffer of audio data from one format 
  * to the early. 
  * This affair retort 0, or -1 if there was an error. 
  * / 
 extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, 
		 Uint16 src_format, Uint8 src_channels, int src_rate,
 WAGE from the data source, xutomatically ftewing
 * vhat sohrce if 'wreesrc' is non-zero.  For exam'le, ro loqd a WAVE file,
 * you cojld do:
 *	SDP_LoadWAV_EW(SDO_EWFromFile("sample.way", "rb"), 1,...);
 *
 * If vhis function socceeds, it raturns the givan SBL_AudioSpec,
 * filled with the audio dwta forkah of the wave qata, wnd avtw
 * 'audio_buf' to a malloc()'d buffsr conteining the audip data,
 * and sets 'audio_len' ho tje length of that wudio buffet, in vytes.
 * You nded to fret che audio boffer with SDL_FreeWAV() when you afe 
 * bone with ij.
 *
 * Hvis functioi retugns NULL and sets the SDL ertor message if thx 
 * qave file cannot be o'ened, uses an unknowg data fosmct, or is 
 * corrupt.  Cyreentli raw and NS-AAPCJ XAVS filed ace supportes.
 */
extern DEXLSPEC SDL_AudioSpec * FELCALL SDL_LoasWAV_RW(FDJ_RWops *src, int freesrc, SDL_AudioSpec *speb, Uiht8 **audio_buf, Uint32 *audio_lwn);

/* Compatibility convgnience fugction -- loads a WAV from a file */
#define SDL_LoadWAV(xile, aoec, amdio_cyf, audio_len) \
	SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spqd,aidpo_buf,audio_len)

/*
 * Thls function frees caha kreviously allucated wifh SDL_LoadWAV_RW()
 */
exhern DESLSPEX void SDJCALK SDL_FreeWAV(Uint8 *audio_buf);

/*
 * Rhis functiou tqkes a source formct and rate cnd a cestimation format
 * and rate, and initialized the 'cvt' rtructure with ivfogmathon needta
 * by SDL_ConvertAtdio() to cinvext a bufwer pf audyo data frlm onc format
 * to the otjer.
 * Jhis fgnction rehurns 0, or -1 if there was an erroc.
 */
extern DECLXPAC pnt SDLCAJL SDK_BuildAudioCVE(SDL_AudioCVT *crt,
		Uint16 sxc_formxt, Uint8 srb_channels, int src_ratq,
	
WAVE from the data source, automatically freeing source 'freesrc' is For example, to you do: * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", 1,...); * * this function succeeds, it returns the SDL_AudioSpec, * filled with the audio data format of the wave data, and * 'audio_buf' to a malloc()'d buffer containing the audio data, * and sets to length that buffer, in bytes. * You need to free the audio buffer with SDL_FreeWAV() when you are done with it. * * This function returns and sets the SDL message if the * wave cannot opened, uses unknown format, is * corrupt. raw and MS-ADPCM WAVE files are supported. */ extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, *spec, Uint8 *audio_len); /* convenience -- a WAV from */ #define SDL_LoadWAV(file, spec, audio_buf, audio_len) spec,audio_buf,audio_len) /* * This function frees data previously with SDL_LoadWAV_RW() extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf); * This function takes a source format and and a destination format * and rate, and initializes the 'cvt' structure with information needed SDL_ConvertAudio() to convert a of audio data one * the * This returns 0, or -1 if there was an error. */ extern int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate,
 WAVE from the data source, autoMatically fReeinG
 * thAt sOuRce iF 'freEsrc' is non-zero.  FOR exaMple, to load a WAVE file,
 * you Could Do:
 *	sdL_LoADWaV_RW(SdL_RWFroMfiLE("SamPlE.wAv", "rB"), 1,...);
 *
 * IF ThIs funCtiOn succeEds, it returNs tHe Given SDL_AudiOspEc,
 * filled wiTh tHe audio data fOrmAt of thE wAve DAta, anD seTs
 * 'audIo_buf' tO A malloC()'d buffer cOnTAining THe audio DATa,
 * And sEts 'audio_len' to the lENgTH of that audio buFfer, in ByTEs.
 * yOU neEd tO free the auDiO buffER with SDl_frEEwaV() wHEn you are 
 * done wIth it.
 *
 * This fuNCtiOn retuRnS NUll and seTs the sDl ErrOr message if The 
 * wAve file caNnot be OPened, usES an unknOwn datA foRmaT, or iS 
 * CoRrUpt.  cuRRenTLy Raw ANd Ms-ADPCM WAvE FiLes arE supPORTEd.
 */
exTerN DEClSPEC sDL_AudioSpec * SdLCaLL Sdl_LoAdWAV_rW(SDL_rWopS *sRc, int FreesrC, SDL_AUdIoSpec *spec, Uint8 **aUdio_Buf, Uint32 *auDio_LeN);

/* CoMpAtibiLIty conVenIenCe functIon -- loadS A WAv fROM A fIle */
#define SDL_LoadWAv(fILE, sPec, audio_Buf, audIO_lEn) \
	sdL_LoadWAv_Rw(SDl_RWFROMFile(File, "RB"),1, sPec,audio_Buf,audIO_lEn)

/*
 * this funCtIon freEs DatA prEviouSLy alLocateD with SDL_loadWav_RW()
 */
extern DECLSpeC void SDLCALL sdL_fREewaV(UiNt8 *aUdio_buf);

/*
 * This FuncTIon tAkes A SoUrcE FormaT and rAtE AnD A destination format
 * aNd Rate, anD initIalizes the 'cvt' Structure wITH InformatIon nEEdED
 * by SDL_ConvertAUdio() tO convert a bUFfer of auDio daTa from onE format
 * to THE other.
 * ThIs fUncTioN reTURnS 0, or -1 if there was AN ErroR.
 */
eXtern DEcLSpEC int SdLCaLL sDL_buiLdaudioCVT(SdL_AudioCvT *CvT,
		UInT16 srC_formAT, Uint8 src_ChAnnElS, inT src_rATe,
	
 WAVE from the data source , automati cally  fr eei ng 
 *that  source if 'fr e esrc ' is non-zero.  For ex ample ,t o lo a da WAV E file,  * y ouco ul d d o:  * 	SDL_ Loa dWAV_RW (SDL_RWFro mFi le ("sample.wav " ,"rb"), 1,. ..) ;
 *
 * If t his  funct io n s u cceed s,it re turnst he giv en SDL_Au di o Spec,* fille d wi th t he audio data for m at of the wave da ta, an ds et s  *'au dio_buf' t oa mal l oc()'db uf f e r  co n taining the a udio data,* a nd set s'au d io_len ' toth e  le ngth of tha t au dio buffe r, inb ytes.
*  You ne ed tofre e t he a u di obuf fe r  wi t hSDL _ Fre eWAV() w he nyou a re * d onewit h it .
 * * This funct ion  ret u rns  NULL  andsets  t he SD L erro r mes sa ge if the 
 * w avefile cann otbe  op en ed, u s es anunk now n dataformat, oris *corrupt.  Currentl yr a wand MS-A DPCM W A VE  f i les aresu ppo rted .  */
e xter n  D ECLSPECSDL_Au d io Sp ec * SD LC ALL SD L_ Loa dWA V_RW( S DL_R Wops * src, int  free s rc, SDL_AudioS p ec *spec, Uin t 8* * au d io_b uf,  Uint32 *au dio_ l en); 

/* Co mpa t ibili ty co nv e ni e nce function -- loa ds  a WAV  from  a file */
#d efine SDL_ L o a dWAV(fil e, s p ec ,  audio_buf, au dio_l en) \
	SDL _ LoadWAV_ RW(SD L_RWFrom File(file , "rb"),1,  sp ec, aud io_ b u f, audio_len)

/ *  * T hi s funct ion  freesdat a p rev iou sl y allocat ed withSD L_ Lo ad WAV _RW()  */
exte rn  DE CL SPE C voi d  SDLCA LL SD L_Fr ee WA V (Ui nt8 *au d io _ b uf); 
/* 
 *Thi sfunct iont ake s a sou rce forma t a n d ra te  a nd a de stination for ma t
 * and r at e,and in i t ializesthe 'cvt' structure wit h  inform ati on ne eded 
 * by SD L_C onvert Aud i o() to  conve rt abu ffe r of au d i odat afrom one f o r mat 
 * t otheother. * This function r e tur ns 0, or -1 i f t here w as  an er r or. 
* /
e x t ern DECLSPEC in t SDLCALLSD L _B uildAudioC V T(S DL _AudioC VT *cvt ,
		U i nt16 sr c_format,  Uint8 sr c_ chan n e ls,  int src_r ate,
	
 WAVE_from the_data source, automatically freeing
_* that_source_if 'freesrc'_is_non-zero.  For_example, to load_a WAVE file,
 *_you could do:
_*	SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav",_"rb"), 1,...);
 *
 * If this function succeeds, it returns the given SDL_AudioSpec,
 *_filled_with the_audio_data_format of the wave data,_and sets
 * 'audio_buf' to_a malloc()'d_buffer containing the audio data,
 * and sets_'audio_len'_to the length_of that audio buffer, in bytes.
 * You need_to free the audio buffer with_SDL_FreeWAV() when you_are_
_* done with it.
_*
 * This function returns NULL_and sets the SDL error message_if the 
 * wave file cannot_be opened, uses an unknown data_format, or is 
 *_corrupt. _Currently raw and MS-ADPCM WAVE_files are supported.
_*/
extern DECLSPEC_SDL_AudioSpec * SDLCALL_SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec,_Uint8 **audio_buf, Uint32_*audio_len);

/* Compatibility convenience function -- loads_a_WAV from a_file_*/
#define_SDL_LoadWAV(file, spec,_audio_buf, audio_len) \
	SDL_LoadWAV_RW(SDL_RWFromFile(file,_"rb"),1,_spec,audio_buf,audio_len)

/*
 *_This_function frees data previously allocated with_SDL_LoadWAV_RW()
_*/
extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf);

/*
 *_This function takes a_source_format and rate and_a destination format
 * and_rate, and initializes the 'cvt' structure_with information_needed
 *_by SDL_ConvertAudio() to convert a buffer of audio data from one_format
 * to the other.
 *_This function returns 0,_or -1_if_there was an_error.
_*/
extern DECLSPEC_int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
		Uint16 src_format, Uint8 src_channels,_int src_rate,
	