Page 1 of 1

Audio Issue :I

Posted: Mon Jul 29, 2013 6:36 pm
by Eamonn
So, my project was going so well, but I've hit another problem: My audio isn't working :O

This issue is a bit of a strange one. I've looked into some audio libraries, but none can help. The problem is: When I collect a food, it only plays that sound once every 5 seconds or so; there is an unwanted delay. There is NO whitespace at the end. Trust me :) So, download the code below and you can have a listen. It's strange.

Game: https://www.dropbox.com/s/43edi26334sb9lr/Game.love

Re: Audio Issue :I

Posted: Mon Jul 29, 2013 6:46 pm
by slime
See the note about WAV files in love.audio.newSource:
The WAV decoder is buggy and as a result may append seconds of silence to loaded sounds. You should convert sounds files to Ogg Vorbis or another supported format.

Re: Audio Issue :I

Posted: Mon Jul 29, 2013 6:47 pm
by Walz.
I add collectCoinBgm:rewind() before the collectCoinBgm:play() and it's work fine.

Re: Audio Issue :I

Posted: Mon Jul 29, 2013 6:50 pm
by Boolsheet
Also, don't forget that once you start a Source, it will play until the end. Calling love.audio.play or [wiki]Source:play[/wiki] on the Source again during that time has no effect.

Re: Audio Issue :I

Posted: Mon Jul 29, 2013 7:33 pm
by Eamonn
Thanks everyone! The code works fine now that I converted everything to an OGG!