sound files fail to play
Posted: Mon Jun 20, 2011 6:45 pm
I am trying to add background music to my game however, despite checking the wiki and making sure that my code was correct, when I run my .love file, no sound plays. My code is:
I have tried this with a .ogg of the file and it still doesnt work. I am having the same problem with images simply failing to load. I am very new to Love and am probably making some moronic mistake here. I have made sure that the sound file is in the top level of the .zip along with main.lua, is that wrong?
Code: Select all
function love.play ()
music = love.audio.newSource("castle.mp3", "stream")
love.audio.play("music")
love.audio.setVolume(1.0)
end