Invert a sound?

Is it possible to invert a sound (play it in reverse) with openfl?
For now, for sounds I want to play in reverse (when I do an undo on an action with a sound for exemple), I have two different version of the sound in my assets: the original sound and the inverted sound. But it would be better if I could only have the original version and play it in reverse with some soundtransform operation. That would reduce the size of my assets and avoid the manual task to make a reverse version of each sound I want to play in reverse :wink:

I believe OpenAL plays forward, only

However, as mentioned in this topic, the WAVE data could be reversed, WAVE is simple (like a BMP) so if you skip past the file header, it could be a basic bit flip.

I don’t know if this is easier than storing one of each sound – separate sounds does give you more flexibility if you ever decide to make the sounds similar, but not identical to a straight reversal

1 Like