Music

Category: Music
Since engine version: 5.1 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);

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.
See also: SetPlayList
See also: Sound
See also: SoundAt
jwk, 2002-08