Кидаю куски кода, сами гляньте
Код AS3:
var soundData:ByteArray = new ByteArray();
sound.extract(soundData,int(sound.length * 44.1));
public static function drawSpectrum(data:AudioStream , height:uint = 120 , widthPerSecond:uint = 100):Sprite
{
var returnObject:Sprite = new Sprite();
var pcmSound:ByteArray = data.codec.decode(data.data);
var numChanels:uint = (data.isStereo == true) ? 2 : 1;
var step:uint = Math.ceil( data.rate * numChanels / widthPerSecond );
var n:uint = 0;
returnObject.graphics.lineStyle(1);
returnObject.graphics.moveTo(0,height/2);
pcmSound.position = 0;
while(pcmSound.bytesAvailable > 0)
{
var c:int = pcmSound.readShort();
if(n % step == 0)
{
returnObject.graphics.lineTo(Math.floor(n / step) , Math.floor(height / 2 + (c / 32767) * (height / 2)) );
}
n++;
}
returnObject.graphics.drawRect(0,0,returnObject.width , height);
return returnObject;
}
Добавлено через 58 секунд
Правда с PCM звуком, а вам надо FLASH - PCM