Source

Represents a source that emits audio.

Members

Functions

_cleanup
void _cleanup()
Undocumented in source.
_setSound
void _setSound(Sound sound)
Undocumented in source.
cleanup
void cleanup()

Cleans up the resources used by the Source.

hasFinishedPlaying
bool hasFinishedPlaying()
pause
void pause()

Pause the Sound that is playing.

play
void play()

Plays the Sound that belongs to this Source.

setLooping
void setLooping(bool loop)

Set if the Source should loop the Sound.

setSound
void setSound(Sound sound)

Set the Sound that this Source plays.

stop
void stop()

Stops playing the Sound.

Properties

location
Vec3 location [@property getter]

The location of the source.

location
Vec3 location [@property setter]

The location of the source.

Static functions

newSource
deprecated Source newSource(Vec3 location)

Create a new source. The backend class will automatically be determined.

Variables

_location
Vec3 _location;
Undocumented in source.
sound
Sound sound;
Undocumented in source.

Meta