Annotated edit history of
SDL_LoadWAV(3) version 2, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SDL_LoadWAV |
|
|
2 |
!!!SDL_LoadWAV |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
EXAMPLE |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
SDL_LoadWAV- Load a WAVE file |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__#include __ |
|
|
17 |
|
|
|
18 |
|
2 |
perry |
19 |
__SDL_!AudioSpec *SDL_LoadWAV__(__const char *file, |
|
|
20 |
SDL_!AudioSpec *spec, Uint8 **audio_buf, Uint32 |
1 |
perry |
21 |
*audio_len__); |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
__SDL_LoadWAV__ This function loads a WAVE __file__ |
|
|
26 |
into memory. |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
If this function succeeds, it returns the given |
2 |
perry |
30 |
__SDL_!AudioSpec__, filled with the audio data format of |
1 |
perry |
31 |
the wave data, and sets __audio_buf__ to a |
|
|
32 |
__malloc__'d buffer containing the audio data, and sets |
|
|
33 |
__audio_len__ to the length of that audio buffer, in |
|
|
34 |
bytes. You need to free the audio buffer with |
|
|
35 |
__SDL_FreeWAV__ when you are done with it. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
This function returns __NULL__ and sets the SDL error |
|
|
39 |
message if the wave file cannot be opened, uses an unknown |
|
|
40 |
data format, or is corrupt. Currently raw, MS-ADPCM and |
|
|
41 |
IMA-ADPCM WAVE files are supported. |
|
|
42 |
!!EXAMPLE |
|
|
43 |
|
|
|
44 |
|
2 |
perry |
45 |
SDL_!AudioSpec wav_spec; |
1 |
perry |
46 |
Uint32 wav_length; |
|
|
47 |
Uint8 *wav_buffer; |
|
|
48 |
/* Load the WAV */ |
|
|
49 |
if( SDL_LoadWAV( |
|
|
50 |
!!SEE ALSO |
|
|
51 |
|
|
|
52 |
|
2 |
perry |
53 |
__SDL_!AudioSpec__, __SDL_!OpenAudio__, |
1 |
perry |
54 |
__SDL_FreeWAV__ |
|
|
55 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.