As per; https://love2d.org/wiki/love.audio.rewind (which is now removed since 11.0)
An example why i'd like to find a way to do this; a player can collect a series of pickups (coins, gems or whatever), which all use the same sound effect that could be an entire second long. But you may pickup/collide with many objects in a single second, and then things sound very spam-like and noisy as you have duplicate sources spamming away.
This is what i had used previously, only requiring a single source;
Code: Select all
function sound:play(fx)
love.audio.rewind(fx)
fx:play()
end
Code: Select all
function sound:play(fx)
fx:clone():play()
end