I have a usb 8 channel sound card. How can I use these 8 channels from flash to do something like the speaker stereo on channel 1+2, and some athmos on the other channels.
regards.
I have a usb 8 channel sound card. How can I use these 8 channels from flash to do something like the speaker stereo on channel 1+2, and some athmos on the other channels.
regards.
How can I use these 8 channels from flash to do something like the speaker stereo on channel 1+2, and some atmospherics on the other channels.
AAC codec supports 8-channel audio ( 7.1 surround).
You could load various AAC sounds (where each file's audio content is mapped to a specific channel during creation of that AAC file).
For example : Your stereo.aac
could have only Front Left + Front Right defined... and your atmos1.aac
uses Back Left, but file atmos2.aac
uses Back Right and so on... (AAC can be contained within some audio-only MP4 or FLV file).
Try the playback test below. If it sounds like what you want to achieve then go ahead and use AAC.
(audio source : https://www2.iis.fraunhofer.de/AAC/multichannel.html)
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.client = new Object();
ns.play("https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader_v2_rtb.mp4");
If you are asking how to use 8 different speakers.... Uhh, I'm 99% flash doesn't support that but it looks like 5.1 surround is supported. But this is worth looking at.
To use the left and right speaker independently, do this:
Create 2 SoundChannel
objects and 2 Sound
objects. Set 1 to your desired left output and one to your right something like this
var leftSound:Sound = new Sound("leftSound");
var rightSound:Sound = new Sound("rightSound");
var trans:SoundTransform = new SoundTransform(1, -1);//volume 1, panning full left
var leftChannel:SoundChannel = leftSound.play(0,1,trans);
trans.pan = 1; // set panning to full right
var rightChannel:SoundChannel = rightSound.play(0,1,trans);
Look it up in the documentation if this doesn't work. docs here
Do the same thing for additional channels but don't mess with the panning (or set them to 0) if you want the athmos to be evenly distributed.
Sound
object for each sound you want to play or song you want to playSoundChannel
object for each channel you want to control. You described a left, a right, and athmos(? Don't know what that is) so that is at least 3 channels. SoundTransform
objectwhat I have done to fix this: using Banana Voicemeeter to route the sound from two differnt apps to dfferent speakers.