Prefered method for looping sound flash as3

后端 未结 6 1943
北荒
北荒 2020-12-30 12:59

I\'m having some issues with looping a sound in flash AS3, in that when I tell the sound to loop I get a slight delay at the end/beginning of the audio.

The audio is

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 13:51

    Gapless looping of mp3's is not trivial due to the way the format works. To simplify a bit; the sound is fitted to a number of frames, this number cannot be chosen arbitrarily, instead some padding (with silence) is required. Mp3 has no way of storing how much padding was added, so this information is lost once the file is encoded.

    The flash IDE get's around this by embedding this metadata, and you can too. You just need to know how much delay is added by the encoder.

    Andre Michelle explains this way better than I can on his blog.

提交回复
热议问题