I have been working on as3 Sound Classes for my application, and stuck in one real big issue.
i am mixing two sounds in my class these is the main basic target for me.
1. i am recording mic sound with playBack sound which is playing in background.
2. When i click on my record button it start mic as well as stream of mp3 file in background.
3. On SampleDataEvent i am taking bytes from playback sound and mic event data bytes in order to mix them together.
4. While doing this mic also records sound which i was playing in background.
5. Due to this i able to here three sounds and can't overcome this problem by seprating track sound from mic.
please help me, let me know if needed sample code here.
I'm pretty sure I understand what you after. And I'm saying I don't think it's possible.
you are playing some background music
you are recording something via the mic
you want to mix the 2 sounds together
but you are getting the background music through the mic as well as the voice
when you mix the mic with the background music you are basically getting 2 copies of the background music (1 from the playback and 1 from the mic)
to solve your problem you would have to find a way to split the mic sample and I really don't think you are going to be able to do this.
You could try and play around with the noiseSuppression level but I don't think you'll see any good results