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

Play song

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:34, 1 May 2007 (edit)
Sandman (Talk | contribs)
m (Throws - -> Errors)
← Previous diff
Revision as of 11:08, 31 July 2007 (edit) (undo)
Sandman (Talk | contribs)
m (Parameters)
Next diff →
Line 9: Line 9:
== Parameters == == Parameters ==
{| {|
-| '''INT''' songID || - Identifier of the song loaded previously with [[load_song]].+| '''INT''' songID || - Identifier of the song loaded previously with [[load_song]]().
|- |-
| '''INT''' repeats || - Number of times to repeat the song. Use -1 for an infinite loop. | '''INT''' repeats || - Number of times to repeat the song. Use -1 for an infinite loop.

Revision as of 11:08, 31 July 2007


Contents

Definition

INT play_song ( <INT songID> , <INT repeats> )

Plays a song.

Parameters

INT songID - Identifier of the song loaded previously with load_song().
INT repeats - Number of times to repeat the song. Use -1 for an infinite loop.

Returns

INT : Errorcode

-1 - Error.
0 - No error.

Errors

Sound inactive - The sound is inactive.
Invalid handle - The song identifier was invalid.
Other - Some Mixer error.

Example

Program example;
Private
    int song;
Begin
    song = load_song("my_song.ogg");
    play_song(song,0);
    Loop
        frame;
    End
End

Used in example: load_song()

Personal tools