Page 1 of 1

Looping sound?

Posted: Thu Dec 30, 2010 7:02 am
by imnotanerd
How would i loop a sound after it's played? Here is what i have for audio:

Code: Select all

src1 = love.audio.newSource("har'money.mp3")

src1:setVolume(0.9)

love.audio.play(src1)

numSources = love.audio.getNumSources()
if numSources == 0 then
	love.audio.play(src1)
end
It plays the sound, but doesn't loop it again.

Re: Looping sound?

Posted: Thu Dec 30, 2010 8:41 am
by tentus
Have you tried using setLooping()?
http://love2d.org/wiki/Source:setLooping

Also, having ' in a filename might lead to future tears. That's probably just the web developer in me speaking, but if you can avoid special characters in filenames, do.

Re: Looping sound?

Posted: Thu Dec 30, 2010 6:42 pm
by imnotanerd
It works now. Thanks!