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

Play 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:35, 26 April 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 2: Line 2:
[[Category:sound]] [[Category:sound]]
-'''INT''' play_wav ( <'''INT''' sound> , <'''INT''' repeats> )+== Definition ==
 +'''INT''' play_wav ( <'''INT''' waveID> , <'''INT''' repeats> )
-Plays a WAV sound effect previously loaded with [[load_wav]]. Use -1 in repeats for an infinite loop if you swing that way.+Plays a [[sound effect]] previously loaded with [[load_wav]].
 + 
 +== Parameters ==
 +{|
 +| '''INT''' waveID || - The [[WaveID]] of the sound effect to be played.
 +|-
 +| '''INT''' repeats || - Number of times to repeat the sound effect. Use -1 for an infinite loop.
 +|}
 + 
 +== Returns ==
 +'''INT''' : Errorcode
 +{|
 +| -1 || - Error.
 +|-
 +| 0 || - No error.
 +|}
 + 
 +== Example ==
 +<pre>
 +Program
 +Private
 + int wave;
 +Begin
 + wave = load_wav("my_wav.wav");
 + play_wav(wave,0);
 + Loop
 + frame;
 + End
 +End
 +</pre>

Revision as of 00:35, 26 April 2007


Contents

Definition

INT play_wav ( <INT waveID> , <INT repeats> )

Plays a sound effect previously loaded with load_wav.

Parameters

INT waveID - The WaveID of the sound effect to be played.
INT repeats - Number of times to repeat the sound effect. Use -1 for an infinite loop.

Returns

INT : Errorcode

-1 - Error.
0 - No error.

Example

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