Hey guys, I recently started messing around a bit with AS3, using FlashDevelop, and I think it's pretty cool.
Now, my problem is as follows: I'm trying to embed a .wav file, as an .mp3 won't loop properly. I've read somewhere that certain types of .wav files can be embedded, while others can't.
However, I haven't been successful. I've tried Googling, but this didn't turn up anything useful (could be that I was searching for the wrong terms).
In short: Is there a way to embed .wav files in FlashDevelop?
Compressed wav files cannot be embedded. You really don't want to include wav files in your project unless you're intending it being an Air application. You should stick to an mp3. I don't where you got the idea that the looping issue can be fixed by using a wav file. I guarantee you that it is your coding causing the issue. But if you really want to embed a wav here is a link.
[URL]http://www.gamedev.sk/how-to-embed-mp3-in-flashdevelop--actionscript-3[/URL]
If you're confused about what is going on in the above check out this link that I just found that seems to explain it.
[url]http://nascode.com/2010/02/01/embedding-asset-at-compile-time-in-pure-as3-project/[/url]
Sort of a bump, but the reason I'm trying to use .wav instead of .mp3 is that, when using .mp3 there's a little bit of silence added before (and I believe after, too) the sound, causing it to not loop seamlessly.
Also, your first link details the embedding of an .mp3 file, not a .wav
Are you arguing it isn't the same process?
If I need to explain to you how to go into audacity and manually remove the silence from the audio file, then you may want to take a few steps back from working with audio. If you think you did that already, then you need to zoom in more.
I did remove the silence, however, when once again saving as an .mp3, Audacity happily adds it again.
Before saving, looping sounds good.
After saving, looping sounds horrible.
What do you mean with arguing that it isn't the same process? When trying to embed a .wav in the same way I'd embed a .mp3, it doesn't work.
After a bit of research I found that most mp3 encoders add a slight delay. There are ways to overcome it. There wouldn't be that issue with a wav, but I don't think you knew that. The easiest way to fix it would be to manually compensate for it in your code. After the first time it plays you'll want to make it play with a slight delay. I'd experiment with values until you find what works best.
Alright, I knew it was the .mp3 format that was causing the problem (or, in this case, the LAME encoder, ath the least), but was trying to just use a .wav instead of having to code extra.
Get "Switch Sound File Converter Free Edition," edit in audacity and save as .wav, convert with Switch. Easy does it!
Sorry, you need to Log In to post a reply to this thread.