Page 1 of 1
Audio
Posted: Fri Nov 23, 2012 2:15 pm
by Magahaka
Hello, today I create my own game main menu. And I want to use music on the main menu. But I don't know how I can do that. Songs format is mp3. How I can start the music, then the game is starting?
Re: Audio
Posted: Fri Nov 23, 2012 4:13 pm
by Qcode
So to get the file in memory you have to use
love.audio.newSource() in love.load. After that you can call
love.audio.play(). Both of these should only be called once, in a function like love.load not love.update or love.draw. Also if you want to you can set your music to loop with
Source:setLooping.
Just tell me if you need me to go into more detail about how to call these properly.
~Qcode
P.S Also .mp3's can be buggy with love. If possible, try converting it into a .ogg file which generally work better and take up less file size!