Files
BlitzNext/_release/help/commands/2d_commands/ChannelPlaying.htm
T
2014-12-08 12:43:20 +13:00

51 lines
1.4 KiB
HTML

<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>ChannelPlaying (channel_handle)</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
channel_handle = variable assigned to the channel when played
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
Often you will need to know if a sound channel has completed playing or not. This command will return 1 if the sound is still playing or 0 if it has stopped. Use this to restart your background music or some other sound that might have stopped unintentionally.
<br />
<br />
Note: This command currently doesn't seem to work with a channel assigned to CD track playback.
</td>
</tr>
</table>
<h1><a href=../2d_examples/ChannelPlaying.bb>Example</a></h1>
<table>
<tr>
<td>
; Channel examples
<br />
<br />
Print "Loading sound ..."
<br />
; Load the sample - you'll need to point this to a sound on your computer
<br />
; For best results, make it about 5-10 seconds...
<br />
sndWave=LoadSound("level1.wav")
<br />
<br />
Print "Playing full sample until sound is done ..."
<br />
chnWave=PlaySound(sndWave)
<br />
While ChannelPlaying(chnWave)
<br />
Wend
<br />
Print "All done!"
<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=ChannelPlaying&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
</html>