0

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.

bluelemonade
  • 1,115
  • 1
  • 14
  • 26

3 Answers3

1

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");
VC.One
  • 14,790
  • 4
  • 25
  • 57
0

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 split the stereo sound

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.

summary

  1. Create a Sound object for each sound you want to play or song you want to play
  2. Create a SoundChannel 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.
  3. Create a SoundTransform object
  4. Play each channel using the desired transform settings as I illustrated above.
Neal Davis
  • 2,010
  • 2
  • 12
  • 25
  • I din't understand. I need minimum 2 stereo outputs to play the sound on 4 speaker. – bluelemonade Oct 14 '16 at 16:53
  • What don't you understand? – Neal Davis Oct 14 '16 at 16:56
  • See my summary above – Neal Davis Oct 14 '16 at 17:00
  • If you don't understand how to do any of these steps (even though I've demonstrated it) post a new question. For instance, if you know how to do step 1 and 2, but step 3 has you stumped, post a new question asking how to do that step and be sure to show what you have tried and explain what isn't working about it. On stack overflow, you are expected to do the leg work yourself so if you haven't taken the time to even read the documentation I posted... please do. – Neal Davis Oct 14 '16 at 17:03
  • See my edit at the top of my post. I think I misunderstood your goal. You are trying to use 8 *different* speakers with 8 *different* sounds? Like surround sound? I don't think you can. – Neal Davis Oct 14 '16 at 17:06
  • Do you currently have at least some sound coming out of the 4 speakers? And you just need to split it left and right? Or are only two giving any output? – Neal Davis Oct 14 '16 at 17:23
  • I think I have to play the sound in a more comfortable software then flash. I think its a shame for adobe not to support ASIO. Also it is not possible to select the audio device for an application. Then I could make two apps, each playing on one sound card... – bluelemonade Oct 14 '16 at 18:08
0

what I have done to fix this: using Banana Voicemeeter to route the sound from two differnt apps to dfferent speakers.

bluelemonade
  • 1,115
  • 1
  • 14
  • 26
  • Why two different apps? Are you not making just one full app in Flash? Also you should tag `AIR` in your question if you're making or involving some desktop application. – VC.One Oct 21 '16 at 13:50