Difference between revisions of "Discard.sound"

From AGI Wiki
Jump to navigationJump to search
Line 7: Line 7:
 
== Remarks ==
 
== Remarks ==
  
In the PC version of AGI, this command points to a null function, and does nothing.
+
This command unloads [[Sound Resource (AGI)|sound]] '''A''' from [[memory]].
 +
 
 +
'''NOTE:''' Text here</span>In the PC version of AGI, this command points to a null function, and does nothing.
  
 
Early versions of AGI did not include a command to unload [[Sound Resource (AGI)|sound]] resources. Since sounds were usually small and only used in limited circumstances, this was not usually a problem. Beginning with [[version]] 2.938, Sierra added this command to allow sounds to be unloaded once they were no longer needed. However, they did not make the command functional in the PC version; it only unloads sounds in non-PC interpreters.
 
Early versions of AGI did not include a command to unload [[Sound Resource (AGI)|sound]] resources. Since sounds were usually small and only used in limited circumstances, this was not usually a problem. Beginning with [[version]] 2.938, Sierra added this command to allow sounds to be unloaded once they were no longer needed. However, they did not make the command functional in the PC version; it only unloads sounds in non-PC interpreters.

Revision as of 09:45, 30 March 2019

The discard.sound command unloads a sound resource from the memory heap.

Syntax

discard.sound(byt A);

Remarks

This command unloads sound A from memory.

NOTE: Text hereIn the PC version of AGI, this command points to a null function, and does nothing.

Early versions of AGI did not include a command to unload sound resources. Since sounds were usually small and only used in limited circumstances, this was not usually a problem. Beginning with version 2.938, Sierra added this command to allow sounds to be unloaded once they were no longer needed. However, they did not make the command functional in the PC version; it only unloads sounds in non-PC interpreters.

Possible Errors

Presumably, attempting to discard a sound that hasn't been loaded will cause errors and crash AGI.

Example

Code:
discard.sound(12);  [ does nothing on PC based system
                    [ on non-PC system, sound #12 is unloaded

Technical Information

Required Interpreter Version: Available in version 2.936 and above, on non-PC interpreters.
Byte-Code Value: 175 (0xAF hex)

See Also

Sound Commands