- This wiki is out of date, use the continuation of this wiki instead
Load wav
From FenixWiki
(Difference between revisions)
Revision as of 01:18, 26 April 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (12:07, 19 September 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
(One intermediate revision not shown.) | |||
Line 3: | Line 3: | ||
== Definition == | == Definition == | ||
- | '''INT''' load_wav ( <'''STRING''' | + | '''INT''' load_wav ( <'''STRING''' filename> ) |
Loads a [[sound effect]] in the WAV format for later use with [[play_wav]](). | Loads a [[sound effect]] in the WAV format for later use with [[play_wav]](). | ||
Line 9: | Line 9: | ||
== Parameters == | == Parameters == | ||
{| | {| | ||
- | | '''STRING''' | + | | '''STRING''' filename || - The WAV file to be loaded, including a possible path. |
|} | |} | ||
Line 15: | Line 15: | ||
'''INT''' : [[WaveID]] | '''INT''' : [[WaveID]] | ||
{| | {| | ||
- | | -1 || - Error | + | | -1 || - Error: sound inactive; opening file |
|- | |- | ||
| 0 || - Could not load wave file. | | 0 || - Could not load wave file. | ||
|- | |- | ||
- | | >0 || - 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() • |