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
Revision as of 00:25, 26 April 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 2: Line 2:
[[Category:sound]] [[Category:sound]]
-'''INT''' load_wav ( <'''STRING''' path> )+== Definition ==
 +'''INT''' load_wav ( <'''STRING''' file> )
-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''' file || - The path to and filename of the wave file.
 +|}
 + 
 +== Returns ==
 +'''INT''' : [[WaveID]]
 +{|
 +| -1 || - Error.
 +|-
 +| 0 || - Could not load wave file.
 +|-
 +| >0 || - WaveID
 +|}
 + 
 +== Example ==
 +<pre>
 +Program
 +Private
 + int wave;
 +Begin
 + wave = load_wav("my_wav.wav");
 + play_wav(wave,0);
 + Loop
 + frame;
 + End
 +End

Revision as of 00:25, 26 April 2007


Contents

Definition

INT load_wav ( <STRING file> )

Loads a sound effect in the WAV format for later use with play_wav().

Parameters

STRING file - The path to and filename of the wave file.

Returns

INT : WaveID

-1 - Error.
0 - Could not load wave file.
>0 - WaveID

Example

Program
Private
    int wave;
Begin
    wave = load_wav("my_wav.wav");
    play_wav(wave,0);
    Loop
        frame;
    End
End
Personal tools