Source:clone

Source:clone

Available since LÖVE 0.9.1
This function is not supported in earlier versions.

Creates an identical copy of the Source in the stopped state.

Static Sources will use significantly less memory and take much less time to be created if Source:clone is used to create them instead of love.audio.newSource, so this method should be preferred when making multiple Sources which play the same sound.

Function

Synopsis

source = Source:clone( )

Arguments

None.

Returns

Source source
The new identical copy of this Source.

Notes

Cloned Sources inherit all the set-able state of the original Source, but they are initialized stopped.

See Also

doc_love
2017-03-21 15:53:13
Comments
Leave a Comment

Please login to continue.