Resampling sound in AS3

Specifically using sound.extract and SampleDataEvent.

Forgive any nubby questions, I don’t have much experience working with sound in a technical sense, OR working with byte arrays/binary data.

I have to resample engine sounds according to current gear and RPM, and I feel a bit clueless on several things.

First, why can’t I access the sound byte array of a Sound directly? Why do I need the SampleDataEvent proxy?

The reason I find this annoying is it’s in set intervals. I might want to do it just once, or do it far more frequently.

For example, let’s say I need to extract and speed up or slow down a sound just once. I should be able to extract the sound bytes, write them to a new Sound object, then play it.

But no, it seems you HAVE to have a SampleDataEvent listening, resampling the sound however often it does, even if nothing is changing. It’s a waste.

Also another thing is the interval is not very fast, so when doing a constant resample of the pitch of an engine sound to simulate revs, you’re going to get a fairly sort of “choppy” sound effect, where it keeps skipping up in pitch, instead of a smooth transition.

One more thing, how do you loop the new resampled sound?

Any insight to these 3 questions would be appreciated.

Cheers,
RumbleSushi