This wiki is out of date, use the continuation of this wiki instead

Load wav

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:11, 22 April 2007 (edit)
Woody (Talk | contribs)

← Previous diff
Current revision (12:07, 19 September 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(3 intermediate revisions not shown.)
Line 2: Line 2:
[[Category:sound]] [[Category:sound]]
-'''INT''' load_wav ( <'''STRING''' path> )+== Definition ==
 +'''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]]().
 + 
 +== Parameters ==
 +{|
 +| '''STRING''' filename || - The WAV file to be loaded, including a possible path.
 +|}
 + 
 +== Returns ==
 +'''INT''' : [[WaveID]]
 +{|
 +| -1 || - Error: sound inactive; opening file
 +|-
 +| 0 || - Could not load wave file.
 +|-
 +| >0 || - The [[WaveID]].
 +|}
 + 
 +== Example ==
 +<pre>
 +Program
 +Private
 + int wave;
 +Begin
 + wave = load_wav("my_wav.wav");
 + play_wav(wave,0);
 + Loop
 + frame;
 + End
 +End
 +</pre>
 +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() •
Personal tools