Difference between revisions of "Stop.sound"

From AGI Wiki
Jump to: navigation, search
(See Also)
 
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();
  
<code>stop.sound();</code>
+
== Remarks ==
  
== <br />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.
  
Starts playback of a SOUND resource. n. When finished, Flag(m) is set to 1.
+
== Possible Errors ==
  
== <br />Example ==
+
None.
 +
 
 +
== 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 ==
+
  
* [[Sound Resource]]
+
{| border="1" cellpadding="2"
* <code>[[sound]]</code>
+
| style="background-color: #efefef" width="200" | '''Required Interpreter Version:'''
* <code>[[load.sound]]</code>
+
| 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