Music

Category: Music
Since engine version: 1.0 OC

Description

Plays a music track. The corresponding music file must be available in the active music group. If the loaded scenario contains music files, the scenario file will be the music group. Otherwise, the global file Music.ocg will be used.

Syntax

int Music(string song_name, bool loop, int fadetime_ms, int resume_time_ms);

Parameters

song_name:
[opt] Filename of the music track. The file extension must be specified. If unspecified, music playback will be interrupted.
loop:
[opt] If 1, the specified track will be looped forever.
fadetime_ms:
[opt] Fading time between any currently playing piece and the newly selected song. Ignored if both are the same. Set to zero to avoid fading.
resume_time_ms:
[opt] If greater than zero, the upcoming piece is resumed from the position where it last stopped playing if at least this amount of time is still left to be played.
See also: SetPlayList
See also: Sound
See also: SoundAt
jwk, 2002-08
Sven2, 2015-09