When Tinic Uro was implementing the dynamic audio features he was also giving us a very nice present called
Sound.extract(). And it is simply awesome!
I wrote a simple experiment yesterday night using the popforge library. Yes — you can use it still with the new features and it is a great help. I just had to convert the sample data into a format for popforge.
The experiment is a simple flanger applied to an MP3. André wrote the flanger about a year ago but it is still fun listening.
The sourcecode will also show you how to loop sounds using
Sound.extract(). It is a very safe way so that you get always as much data as you need.
There is only one problem right now. I wanted to use the new FileReference features so that you can load your own MP3s into the flanger. But unfortunately there is currently no easy way to do this. You would have to load the bytes, then create a SWF at runtime and inject the MP3. Then you could load that SWF with
Loader.loadBytes() and once that is complete you can extract the sound. I thought doing that would be a little bit too much for a small demo :)