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

← Previous diff
Current revision (12:07, 19 September 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(2 intermediate revisions not shown.)
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]].
|} |}
Line 34: Line 34:
End End
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