0 Replies Latest reply on Oct 11, 2006 10:52 AM by Palin_Exnihilo

    Sounds with Flash 9

      Hi there,

      I'm facing some problems with the new sounds API in flash 9 with actionScript 3.0. First, it seems that you can only load *.MP3 files. So what I understand from this is that I can't load anything else than MP3 files if I want to load dynamicaly my sounds. The good side is the size of file, my user will save mucho bandwith loading MP3 than wav, but the bad side is the gaps inserted in the mp3 files. When you encode a .wav file in mp3 the encode do insert some gaps at the start of the file. Also, the decoder will insert some more gaps before actually reading the file, but once the file is read the gaps is not inserted between each iteration of the loop. The gap inserted by the encode still existe and still do some silence unwanted in a file supposed to run in perfect loop.

      I wanted to know if someone know a work around, maybee with the SoundMixer class or SoundChannel in such way I can trim or cut the gap. I do not want to replace the gap with a silence, so I don't want only to detect the unwanted silence but also SKIP IT! It's not easy to do, it seems there are some costly apps that do trim the gap and also LAME encoder do add some header information in the file to help the decoder to successfully remove the gap. But, for the LAME header work correctly you need a decoder that support it. If the decoder you use don't support it, chance are that it will add another silence frame instead of intepreting correctly the header.

      help me