Moai SDK SNAPSHOT (build 42)

MOAIUntzSound Class Reference

Untz sound object.

Attributes
MOAIUntzSound.ATTR_VOLUME
.

Inheritance diagram for MOAIUntzSound:
Collaboration diagram for MOAIUntzSound:

List of all members.

Function List

 getLength
 getPosition
 getVolume
 getFilename
 isLooping
 isPaused
 isPlaying
 load
 moveVolume
 pause
 play
 seekVolume
 setLooping
 setLoopPoints
 setPosition
 setVolume
 stop

Function Documentation

getFilename

Return the file name of the sound.


function getFilename ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
filename ( string )
getLength

Return the duration of the sound.


function getLength ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
length ( number )
getPosition

Return the position of the cursor in the sound.


function getPosition ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
position ( number )
getVolume

Return the volume of the sound.


function getVolume ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
volume ( number )
isLooping

Return the looping status if the sound.


function isLooping ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
looping ( boolean )
isPaused

Return the pause status of the sound.


function isPaused ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
paused ( boolean )
isPlaying

Return the playing status of the sound.


function isPlaying ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
playing ( boolean )
load

Loads a sound from disk.


function load ( MOAIUntzSound self, string filename )

Parameters:
self( MOAIUntzSound )
filename( string )
Returns:
nil
moveVolume

Animation helper for volume attribute,.


function moveVolume ( MOAITransform self, number vDelta, number length [, number mode ] )

Parameters:
self( MOAITransform )
vDelta( number ) Delta to be added to v.
length( number ) Length of animation in seconds.
mode( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )
pause

Pause the sound.


function pause ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
nil
play

Play the sound.


function play ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
nil
seekVolume

Animation helper for volume attribute,.


function seekVolume ( MOAITransform self, number vGoal, number length [, number mode ] )

Parameters:
self( MOAITransform )
vGoal( number ) Desired resulting value for v.
length( number ) Length of animation in seconds.
mode( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )
setLooping

Set or clear the looping status of the sound.


function setLooping ( MOAIUntzSound self [, boolean looping ] )

Parameters:
self( MOAIUntzSound )
looping( boolean ) Optional. Default value is 'false.'
Returns:
nil
setLoopPoints

Sets the start and end looping positions for the sound.


function setLoopPoints ( MOAIUntzSound self, double startTime, double endTime )

Parameters:
self( MOAIUntzSound )
startTime( double )
endTime( double )
Returns:
nil
setPosition

Sets the position of the sound cursor.


function setPosition ( MOAIUntzSound self [, boolean position ] )

Parameters:
self( MOAIUntzSound )
position( boolean ) Optional. Default value is 0.
Returns:
nil
setVolume

Sets the volume of the sound.


function setVolume ( MOAIUntzSound self [, boolean volume ] )

Parameters:
self( MOAIUntzSound )
volume( boolean ) Optional. Default value is 0.
Returns:
nil
stop

Stops the sound from playing.


function stop ( MOAIUntzSound self )

Parameters:
self( MOAIUntzSound )
Returns:
nil