Difference between revisions of "Stop.sound"

From AGI Wiki
Jump to navigationJump to search
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
stop.sound
+
The '''stop.sound''' command stops a sound resource that is playing.
  
Stops playback of current sound.
+
== Syntax ==
  
 +
stop.sound();
  
 +
== Remarks ==
  
 
+
If a [[Sound Resource (AGI)|sound]] is currently playing, this command will stop it, and set the done [[flag]] associated with the sound to TRUE. If no sound is currently playing, this command does nothing.
 
 
== <br />Syntax ==
 
  
Starts playback of a SOUND resource. n. When finished, Flag(m) is set to 1.
+
== Possible Errors ==
  
<code>stop.sound();</code>
+
None.
  
&nbsp;
 
== Remarks ==
 
 
 
&nbsp;
 
 
== Example ==
 
== Example ==
  
 
<div class="CodeBlockHeader">Code:</div>
 
<div class="CodeBlockHeader">Code:</div>
 
<syntaxhighlight lang="agi">
 
<syntaxhighlight lang="agi">
stop.sound();
+
load.sound(20);
 +
sound(20, f199);
 +
...
 +
stop.sound(); [ f199 is now set to TRUE
 
</syntaxhighlight>
 
</syntaxhighlight>
 
&nbsp;
 
  
 
== Technical Information ==
 
== Technical Information ==
  
 +
{| border="1" cellpadding="2"
 +
| style="background-color: #efefef" width="200" | '''Required Interpreter Version:'''
 +
| width="175" | Available in all AGI versions.
 +
|-
 +
| style="background-color: #efefef" | '''Byte-Code Value:'''
 +
| 100 (0x64 hex)
 +
|}
  
 
&nbsp;
 
 
== See Also ==
 
== See Also ==
  
* [[Sound Commands|Sound Commands]]
+
[[Sound Commands]]<br />
* [[AGI Specifications: Chapter 4 - The LOGIC Language#stop.sound|AGI Specifications: Chapter 4 - The LOGIC Language stop.sound]]
+
[[Category:Commands]]<br />
 
 
&nbsp;
 
== Sources ==
 
 
 
* [[WinAGI|WinAGI]] help file
 
 
 
&nbsp;
 
 
 
[[Category:Sound Commands]]
 
[[Category:References]]
 
[[Category:Logic]]
 

Latest revision as of 20:18, 23 April 2019

The stop.sound command stops a sound resource that is playing.

Syntax

stop.sound();

Remarks

If a sound is currently playing, this command will stop it, and set the done flag associated with the sound to TRUE. If no sound is currently playing, this command does nothing.

Possible Errors

None.

Example

Code:

<syntaxhighlight lang="agi"> load.sound(20); sound(20, f199); ... stop.sound(); [ f199 is now set to TRUE </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 100 (0x64 hex)

See Also

Sound Commands