Audio Issue :I

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.
Post Reply
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

Audio Issue :I

Post 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
"In those quiet moments, you come into my mind" - Liam Reilly
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Audio Issue :I

Post 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.
User avatar
Walz.
Prole
Posts: 13
Joined: Mon May 06, 2013 2:42 pm

Re: Audio Issue :I

Post by Walz. »

I add collectCoinBgm:rewind() before the collectCoinBgm:play() and it's work fine.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Audio Issue :I

Post 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.
Shallow indentations.
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

Re: Audio Issue :I

Post by Eamonn »

Thanks everyone! The code works fine now that I converted everything to an OGG!
"In those quiet moments, you come into my mind" - Liam Reilly
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 32 guests