function love.load()
sound = love.audio.newSource( "bump.wav", "static" )
end
function love.mousepressed(x, y, button)
love.audio.play(sound)
end
In theory this should play the sound every time I click the mouse. In practice, it will make the sound the first time I click, but won't do it again for about five and a half seconds no matter how much I click.
Is this normal? Do I need to use a different method if I want to play sounds rapidly, or is my PC the culprit?
The reason it won't play multiple times simultaneously is because you're trying to play a Source that's already playing - LÖVE can't play it again until it's finished.
Interestingly, if I call love.audio.stop() immediately before love.audio.play(source) then it plays correctly every time I click, but this is not an ideal solution since I'll probably also want music in my game and this would kill that.