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 .
Petunien
Party member
Posts: 191 Joined: Fri Feb 03, 2012 8:02 pm
Location: South Tyrol (Italy)
Post
by Petunien » Thu Mar 29, 2012 11:57 am
If you renamed it easily how baconhawka7x said, try to convert the original .mp3 to .ogg with Super 2012 or another audio converter programm your choice.
I'm also a beginner, but if you want to set the audio function in a extern .lua file try it like this:
audio.lua:
Code: Select all
function playMusic()
music = love.audio.newSource("hurricane.ogg")
love.audio.setVolume(1.0)
love.audio.play(music)
end
main.lua:
Code: Select all
require "audio"
function love.load()
playMusic()
end
This will start the "playMusic" function in the audio.lua when the game starts.
Please correct me, if this is wrong or there are better solutions.
Last edited by
Petunien on Thu Mar 29, 2012 2:54 pm, edited 1 time in total.
"Docendo discimus" - Lucius Annaeus Seneca
tentus
Inner party member
Posts: 1060 Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:
Post
by tentus » Thu Mar 29, 2012 2:42 pm
I keep seeing this in this thread:
This is
wrong and
will not work in 0.8.0.
The right way to require files is thus:
Nixola
Inner party member
Posts: 1949 Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy
Post
by Nixola » Thu Mar 29, 2012 3:51 pm
As far as I know, LÖVE still uses Lua 5.1, so the first link is
http://www.lua.org/manual/5.1/
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
rokit boy
Party member
Posts: 198 Joined: Wed Jan 18, 2012 7:40 pm
Post
by rokit boy » Thu Mar 29, 2012 7:47 pm
I think it would be easier if you used an audiolib
u wot m8
Users browsing this forum: Azzla , Bing [Bot] , Google [Bot] and 1 guest