Audio Drift in Flash

8 posts / 0 new
Last post
Audio Drift in Flash

I've expereienced what I believe is called "audio drift" when animating in Flash. This has happened in the SWF file as well as the Quicktime export. Like, in the FLA file, the audio lines up with the animation, but when exported/movie tested, the sounds drifts. Does anybody know why this happens? Or how to avoid it? It happened to me once, and I really want to figure out how to avoid it in the future. Everything is 30 fps, so I know it's the same as video, so it can't be that. Does it have to do with the sound files? Any suggestions? Thanks!

Hi Jane, it's most likely the audio clip, and kHz it's at. Flash can only handle 44 kHz 16 Bit audio. If your audio clip is at a higher rate, Flash will "dumb it down" to 44kHz. So every thing will seem fine when you're animating in Flash, but when you export it out as a swf, avi, or what have you, the audio will go back to it's native kHz and slowly play faster.

So make sure your audio clips are at the exact rate that Flash can handle. If you don't have program that can do this, I think Soundforge can do it. It's a free download.

Aloha,
the Ape

...we must all face a choice, between what is right... and what is easy."

Goldwave is also a good audio editor. Shareware, but it works great even if you don't pay - you just have to restart it after some generous number of edits.

If you're a Mac user, you can try to find an old copy of SoundApp. Converts to and from a large number of file formats & bit-rates. Don't know if there's a OS X version, though...

A nice Mac sound editing app is Audacity.

Hi, I've experienced the same thing and found a good workaround.

A few years ago, I found myself very frustrated with how Flash would playback my sounds whenever I animated at a frame rate of 24 frames per second (fps) or higher. I had no problems when I animated at 12 fps, but for some reason when animating at 24 fps of 30 fps, the sounds wouldn't play in the spots where I wanted them to in the .swf version, instead they would play earlier than I had placed them. My sound effects and lip sync would be off. It didn't matter if I had the sounds set to 'stream' or 'sync' or the version of Flash that I was using, the sounds would continually play ahead of when I wanted them to.
The solution:
Then I made an animation at 24 fps and had a music track playing continuously during the entire animation, and magically, all of my sounds played back correctly when I made my .swf! I realized the secret was having a sound playing the entire time. For some reason this fixed the problem. But what was I supposed to do if I was animating something without music? A friend suggested putting in a 'blank' sound and have it play the entire time. Well, I didn't necessarily have a 'blank' sound effect, so I improvised. I imported a small sound effect and edited it with within Flash by turning the sound all the way down in the 'edit envelope'.

Here is exactly what I did to fix the problem:

Imported a sound effect with a very small file size (12k - 20K)
Put the sound effect on it's own layer in the timeline
Edited the sound using the 'edit envelope' to turn the volume of the sound effect off
Set the properties of the sound file to 'stream'
Set the sound file to loop 999 times
Doing this made the new 'blank' sound play during the entire animation since it was looping so many times, and fixed the problem and barely raised the overall file size of my .swf. Hopefully Adobe will fix this glitch so that there isn't a problem to begin with, but this solution lets you animate at higher frame rates to get that smoother looking animation, and not have any audio problems.

Flash Character Packs, Video Tutorials and more: www.CartoonSolutions.com

BlueHickey-- I found that exact advice on a blog last night. I guess the idea is that it helps the sound stick to the animation if there is something there the whole time. I am going to try that out. Thanks. I'm glad I'm not the only one who has had this problem-- it is VERY annoying, and I want to avoid this happening again. I always use Garageband for sound-- I don't know how to check or change the khz, but the way I've been doing it has never been a problem before for me, just this one time. I'm going to definitely try this trick out with the silence sound looped for the whole animation and see if that helps avoid audio drift in the future.

Yeah, it will work, it's just too bad this happens in the first place. I wish they'd fix the Flash player to not have this problem. I first ran into this back in Flash MX, and it's still an issue.

Flash Character Packs, Video Tutorials and more: www.CartoonSolutions.com