audioDrivername()
openAudio(Desired, ForceFormat)
closeAudio()
getAudioStatus()
pauseAudio(true)
loadWAV(File)
freeWAV(#audiop{ptr=Ptr})
play_audio(#audiop{ptr=Ptr,size=Size}, Repeat)
convertAudio(FromAS, ToAS, #audiop{ptr=Ptr,size=Size}) Args: none
Returns: DriverName(String) or []
C-API: char *SDL_AudioDriverName(char *namebuf, int maxlen);
Args: DesiredFormat (audiospec-record), ForceFormat (true | false)
Returns: ObtainedFormat or exit(audio_failure)
C-API: int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
Args: none
Returns: ok
C-API: void SDL_CloseAudio(void);
Args: none
Returns: Status
C-API: SDL_audiostatus SDL_GetAudioStatus(void);
Args: [true | false]
Returns: ok
C-API: void SDL_PauseAudio(int pause_on);
Args: FileName
Returns: {AudioSpec, AudioBufferPtr} or exits
C-API: SDL_AudioSpec *SDL_LoadWAV(char *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
Args: AudioWavRef
Returns: ok
C-API: void SDL_FreeWAV(Uint8 *audio_buf);
Args: AudioWavRef, SampleLen, Repeat (integer or infinity)
Returns: ok
Desc:
Used to start audio playing
Args: FromAudioSpec, ToAudioSpec, SampleBuffer
Returns: NewBuffer or exists if conversion failed
C-API: int SDL_ConvertAudio(SDL_AudioCVT *cvt);
Desc:
This differs from the orginal SDL function in both syntax and semantics, convertAudio handles the buildCVT and other things SDL requires. convertAudio converts Buffer (in 'FromAudioSpec' format) and returns a new audio buffer (in 'ToAudioSpec' format) Don't forget to call freeWav with old Buffer