If you read the first code section of this blog post, it describes how to mix audio tracks using AS3 rather than pixel bender

http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html

There are a lot of posts on the net about mixing audio with Flash

http://www.google.co.uk/#sclient=psy&hl=en&q=flash+as3+mixing+audio+sample+data&aq=f&aqi=&aql=&oq=&pbx=1&fp=2e26c5153a2f6c6


On 17/02/2011 16:42, Pierrick Pluchon wrote:
Ok , i didn't get a clue on how to do that :)
Is it possible to have a pseudocode example please(or even better as3) :D ?
Currently, i can easily get a byteArray for each sound, and i know when each
note should play.

But, how to "add them together"?


2011/2/17 Henrik Andersson<he...@henke37.cjb.net>

You need to do your own mixing. First you need a way to get each note and
then a way to know when each note should play.

With that information you can start mixing, read the value of the first
sample from each note currently playing and add them together, this is the
mixed value. Now write that out and you have mixed one sample worth of
audio.

Repeat a few million times, but with the next samples and you are done.


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to