So here is part 2 (part1) of this nights sleepless hours product.
This is a little example of how to load multiple wave files and show the waveform of each wave file.
You can also save a Mix of all files as one wav. This uses my new Wave Mix class which is super simple to use.
You have to pass it an Array of WaveReaders in the constructor like this:
var waveMix:WaveMix = new WaveMix(myWaveReaders);
Then you just call the mix() method of the WaveMix class and it return a ByteArray which is the new wave file.
You can now use this to save the bytes to the filesystem or send them to a server.
var waveBytes:ByteArray = waveMix.mix();
There are still some problems with wave files of different sample sizes. It works best if all files are 44500 Hz, 16Bit, Stereo wave files.
I`ll work on that 🙂
I know it`s al a bit ugly unfinished code but it`s all from one night so bear with me.
Leave a Reply