Looping sound?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
imnotanerd
Prole
Posts: 6
Joined: Thu Dec 30, 2010 6:55 am
Contact:

Looping sound?

Post 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.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Looping sound?

Post 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.
Kurosuke needs beta testers
imnotanerd
Prole
Posts: 6
Joined: Thu Dec 30, 2010 6:55 am
Contact:

Re: Looping sound?

Post by imnotanerd »

It works now. Thanks!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests