Tao.Sdl SDK Documentation |
|
Sdl.SDL_LoadWAV_RW Method
This function loads a 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, ...);
[Visual Basic]
Public Shared Function SDL_LoadWAV_RW( _
ByVal
src As
IntPtr, _
ByVal
freesrc As
Integer, _
ByRef
spec As
IntPtr, _
ByRef
audio_buf As
IntPtr, _
ByRef
audio_len As
Integer _
) As
IntPtr
Parameters
-
src
-
-
freesrc
-
-
spec
-
-
audio_buf
-
-
audio_len
-
Return Value
Remarks
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.
Binds to C-function call in SDL_audio.h:
SDL_AudioSpec * SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
See Also
Sdl Class | Tao.Sdl Namespace