openclonk/docs/sdk/script/fn/Music.xml

47 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>Music</title>
<category>Music</category>
<version>5.1 OC</version>
<syntax>
<rtype>int</rtype>
<params>
<param>
<type>string</type>
<name>song_name</name>
<desc>Filename of the music track. The file extension must be specified. If unspecified, music playback will be interrupted.</desc>
<optional />
</param>
<param>
<type>bool</type>
<name>loop</name>
<desc>If 1, the specified track will be looped forever.</desc>
<optional />
</param>
<param>
<type>int</type>
<name>fadetime_ms</name>
<desc>Fading time between any currently playing piece and the newly selected song. Ignored if both are the same. Set to zero to avoid fading.</desc>
<optional />
</param>
<param>
<type>int</type>
<name>resume_time_ms</name>
<desc>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.</desc>
<optional />
</param>
</params>
</syntax>
<desc>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.</desc>
<related><funclink>SetPlayList</funclink></related>
<related><funclink>Sound</funclink></related>
<related><funclink>SoundAt</funclink></related>
</func>
<author>jwk</author><date>2002-08</date>
<author>Sven2</author><date>2015-09</date>
</funcs>