To process an existing audio stream, you have to set up an output Sound object, without loading a sound into it. Then listen on that sound object for the SampleDataEvent.SAMPLE_DATA, which is fired whenever a Sound object, for which the buffer is empty, starts playing. You will need to fill it's buffer with stereo PCM data (pairs of floating point numbers.)
To get those numbers, use the Sound.extract() method on your input Sound object (the one you've simply called sound in your code above) to read PCM data to a ByteArray. Process the data of that ByteArray however you want, and put it in the output buffer.
var input : Sound;
var output : Sound;
// ... set up your input sound source ... //
output = new Sound();
output.addEventListener(SampleDataEvent.SAMPLE_DATA, handleSampleData);
output.play();
// The SAMPLE_DATA event is dispatched whenever the output Sound object
// buffer is empty. Fill the buffer to keep playing sound.
function handleSampleData(ev : SampleDataEvent) : void
{
var buffer : ByteArray = new ByteArray;
input.extract(buffer, 2048);
// PCM data from input is now in the buffer ByteArray. Filter the sound
// data according to your requirements here.
ev.data.writeBytes(buffer);
}
There's also some sample code on the subject in the reference documentation for the extract() method.