Files
QtGameMaker/help/files/409_02_sounds.html
T

44 lines
1.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Sounds</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Sounds</h3>
The following routines can be used to create new sounds and to remove them.
<p>
<blockquote>
<tt><b>sound_add(fname,kind,preload)</b></tt>
Adds a sound resource to the
game. fname is the name of the sound file. kind indicates the kind of sound
(0=normal, 1=background, 2=3d, 3=mmplayer) preload indicates whether the
sound should immediately be stored in audio memory (true or false). The function returns the index
of the new sound, which can be used to play the sound. (-1 if an error occurred, e.g. the
file does not exist).<br>
<tt><b>sound_replace(index,fname,kind,preload)</b></tt>
Same as the
previous function but this time a new sound is not created but the existing sound index is
replaced, freeing the old sound. Returns whether correct.<br>
<tt><b>sound_delete(index)</b></tt>
Deletes the indicated sound, freeing all memory
associated with it. It can no longer be restored.<br>
</blockquote>
<p>
<!--END-->
</body>
</html>
<!-- KEYWORDS
sound_add()
sound_replace()
sound_delete()
-->