Sound

Simple wrapper for the sound class, currently only allows for loading a sound.
Return to Index
new ( string filename , boolean to_stream = false )
__gc ( )
__eq ( am.sound rhs ) -> ( boolean )
filename ( ) -> ( string )
streaming ( ) -> ( boolean )
new ( string filename , boolean to_stream = false )
Creates a new sound from a filename as either a whole sound or a streaming sound.
Parameters:
string filename : The path to the sound file.
boolean to_stream = false : When true the sound will be loaded for streaming which is best for long music tracks. However streaming sounds can only be attached to one sound source. Non-streaming sounds cna be attached to as many sound sources as you like.
__gc ( )
Releases the reference counter on the sound.
__eq ( am.sound rhs ) -> ( boolean )
Compares this sound with another sound object.
Parameters:
am.sound rhs : The other sound to compare with.
Returns:
boolean : True if they are the same object.
filename ( ) -> ( string )
Returns the filename of the loaded sound. An empty string indicated an unloaded sound.
Returns:
string : The file name of the loaded sound.
streaming ( ) -> ( boolean )
Returns true if the sound is a streaming sound.
Returns:
boolean : True if the sound is being streamed.