Love 0.6.2 and the new beta both do this for me on Linux. I don't normally use the Audio module that much, since Löve is mainly a testbed of game ideas for me. I basically have a bunch of hacks lying around, but no complete games.
If I load a short WAV file as a static Source and try to play it, playing only works after a delay of approximately five seconds. For example, if I write a simple program to play the same sound every second, I only get to hear the sound after intervals of approximately five seconds. It seems the other play() calls are just ignored. This is not a property of the sound file, since I can play it with greater frequency in Audacity or with a Python SFML program I wrote to test it.
Anybody else suffering from this? Am I misusing the API? I am using 64-bit Ubuntu 10.04, and otherwise I have not issue with sound. I suppose it would be easiest for me to just ignore the problem, as I don't need reliable sound fx. For now
I have tried using ALSA instead of PulseAudio, as per these instructions, but it had no effect. I reinstalled PulseAudio afterwards, as it works well enough for me.
http://art.ubuntuforums.org/showthread. ... ost9202903
Here is the test program I am using. I won't give the sound file, but like I said, it works without delay elsewhere, and I tried several other sounds.
EDIT: The same thing happened in Windows on the same computer.
Code: Select all
sound = love.audio.newSource("Blooomp.wav", "static")
function love.keypressed(key)
if key == 'q' then love.event.push('q') end
end
accum = 0
ticks = 0
function love.update(dt)
accum = accum + dt
if accum > 1.0 then
accum = accum - 1.0
ticks = ticks + 1
love.audio.play(sound)
end
end
function love.draw()
love.graphics.print(tostring(ticks), 30, 30)
end