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

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Source:clone

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部