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 01:18, 26 April 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 11:26, 31 July 2007 (edit) (undo)
Sandman (Talk | contribs)
m
Next diff →
Line 3: Line 3:
== Definition == == Definition ==
-'''INT''' load_wav ( <'''STRING''' file> )+'''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''' file || - The path to and filename of the wave file.+| '''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.
|} |}

Revision as of 11:26, 31 July 2007


Contents

Definition

INT load_wav ( <STRING filename> )

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

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

Used in example: play_wav()

Personal tools