Search code examples
audioactionscriptmp3

Playing Sound at 2x speed in Flash / Actionscript


While the documentation for extract ...

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html#extract()

... appears to describe filtering an audio stream to "up octave" (and by implication, double the speed) of a sound sample, in reality, what happens is you get a "doubling effect" when you play back (at least in Flash CS 5, OSX/Lion) as in "IT IT DOUBDOUBLESLES THETHEMICMICROROSAMSAMPLESLPES".

Is there a way to create an entirely new Sound file based on a set of bytearray data without doing so "on the fly" with events?

Thanks


Solution

  • I think loadPCMFromByteArray is what you are looking for, provided you know what values to put in the PCM bytearray to get the sound you want.