Difference between revisions of "Stop.sound"

From AGI Wiki
Jump to navigationJump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The stop.sound command stops playback of current sound.
+
The '''stop.sound''' command stops a sound resource that is playing.
  
 
+
== Syntax ==
  
== <br />Syntax ==
+
stop.sound();
 +
 
 +
== Remarks ==
  
<code>stop.sound();</code>
+
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 />Remarks ==
+
== Possible Errors ==
  
Starts playback of a SOUND resource. n. When finished, Flag(m) is set to 1.
+
None.
  
== <br />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>
  
== <br />Technical Information ==
+
== Technical Information ==
 
 
 
 
 
 
== <br />Sources ==
 
 
 
* [[WinAGI|WinAGI]] help file
 
 
 
== <br />See Also ==
 
  
* <code>[[sound]]</code>
+
{| border="1" cellpadding="2"
* <code>[[load.sound]]</code>
+
| style="background-color: #efefef" width="200" | '''Required Interpreter Version:'''
* [[Sound Resource]]
+
| width="175" | Available in all AGI versions.
* [[AGI Sound Tutorial]]
+
|-
* [[Sound Commands|Sound Commands]]
+
| style="background-color: #efefef" | '''Byte-Code Value:'''
* [[AGI Specifications: Chapter 4 - The Logic Language#stop.sound|AGI Specifications: Chapter 4 - The Logic Language stop.sound]]
+
| 100 (0x64 hex)
 +
|}
  
&nbsp;
+
== See Also ==
  
[[Category:Sound Commands]]
+
[[Sound Commands]]<br />
[[Category:References]]
+
[[Category:Commands]]<br />
[[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:
load.sound(20);
sound(20, f199);
...
stop.sound();  [ f199 is now set to TRUE

Technical Information

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

See Also

Sound Commands