49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<title>Blitz3D Docs</title>
|
|
<link rel=stylesheet href=../css/commands.css type=text/css>
|
|
</head>
|
|
<body>
|
|
<h1>LoopSound sound_variable</h1>
|
|
<h1>Parameters</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
sound_variable = variable previously assigned with a LoadSound command.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>Description</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
This command sets up play back a sound file (.WAV or .MP3) in an endless loop (like for background music). You must load a variable with a sound file using the LoadSound command. Use a Global variable to ensure your sound loop can be played from anywhere in your program. Note: This command doesn't actually PLAY the sound loop, just sets it up for looping. You still need to execute the PlaySound command to hear the sound.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1><a href=../2d_examples/LoopSound.bb>Example</a></h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
; Assign a global variable for the sound loop
|
|
<br />
|
|
Global sndMusicLoop
|
|
<br />
|
|
|
|
<br />
|
|
; Load the sound loop file into memory
|
|
<br />
|
|
|
|
<br />
|
|
sndMusicLoop=LoadSound("sounds/loop1.wav")
|
|
<br />
|
|
|
|
<br />
|
|
; Set the sound loop
|
|
<br />
|
|
|
|
<br />
|
|
LoopSound sndMusicLoop
|
|
<br />
|
|
|
|
<br />
|
|
PlaySound sndMusicLoop
|
|
<br />
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<a target=_top href=../index.htm>Index</a><br>
|
|
<br>
|
|
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=LoopSound&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
|
|
</html>
|