- This wiki is out of date, use the continuation of this wiki instead
Load wav
From FenixWiki
(Difference between revisions)
| Revision as of 11:26, 31 July 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (12:07, 19 September 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
| Line 19: | Line 19: | ||
| | 0 || - Could not load wave file. | | 0 || - Could not load wave file. | ||
| |- | |- | ||
| - | | >0 || - The WaveID. | + | | >0 || - The [[WaveID]]. |
| |} | |} | ||
| Line 36: | Line 36: | ||
| </pre> | </pre> | ||
| Used in example: [[play_wav]]() | Used in example: [[play_wav]]() | ||
| + | |||
| + | {{Funcbox | ||
| + | | category=Sound | ||
| + | }} | ||
Current revision
Contents |
[edit] Definition
INT load_wav ( <STRING filename> )
Loads a sound effect in the WAV format for later use with play_wav().
[edit] Parameters
| STRING filename | - The WAV file to be loaded, including a possible path. |
[edit] Returns
INT : WaveID
| -1 | - Error: sound inactive; opening file |
| 0 | - Could not load wave file. |
| >0 | - The WaveID. |
[edit] Example
Program
Private
int wave;
Begin
wave = load_wav("my_wav.wav");
play_wav(wave,0);
Loop
frame;
End
End
Used in example: play_wav()
| Sound Functions | |
| • Is_playing_song() • Load_song() • Load_wav() • Pause_song() • Play_song() • Play_wav() • Resume_song() • Set_song_volume() • Unload_song() • | |
