Send sound to concrete output channel in Unity3D - c#

I would like to know how can I send sound to concrete output channel in Unity3D. I have 3 output channels (and three speakers connected to 5.1 audiocard) and I want to put unique mono sound to everyone and one common spatial stereo sound to all of them with center in 2nd channel. Can I do it without additional tools like FMOD or WWISE?
P.S. I'm using Unity3D 5.4.0 and I would like to use Unity Mixer in this project. Regular stereo WAV files are the sources of sound.

Related

How to output two different audio to two audio devices separately from same Unity3d application

I am developing a two player game in which one player will have to hear one type of audio and second player to hear different audio. The computer is planned to be connected with two audio devices - one headset and another headset using usb sound card. The game is planned to be developed using Unity3d. How to split audio? Is it possible to use FMOD and generate this? How to send separate audio from same game to separate audio devices ? Thanks!

Output multiple audio to individual sound card channels

I have an eight channel sound card. 8 audio in and 8 audio out. When the driver for the sound card is installed, the following is shown on Playback devices.
Play 1-2
Play 3-4
Play 5-6
Play 7-8
I can enumerate all 4 devices (Play 1-2,Play 3-4) and play on each of them. The current situation only allows me to have 4 audio outputs. The sound card also has individual audio out wires/port for each channel.
What I want to do is to play on Play 1, Play 2, Play 3, etc. Is there any way to achieve this. I am currently using NAudio to enumerate and playback.
You can play two independent mono streams out of one of the stereo pairs using MultiplexingSampleProvider or MultiplexingWaveProvider. If you want to treat the whole soundcard as a single device, then I've found AsioOut tends to be the only option and again you can use the multiplexing providers to route individual NAudio wavestreams to the different device outputs.

How can I record the application output audio as input using Unity Microphone

Hi I'm making a game about recording in-game audio, but all I can do is recording with internal microphone, the default input audio device. I try to see the list of devices in Unity with Microphone.devices, but depend of my Windows configurated devices, I need a solution to work in any computer. Maybe something related to FMOD custom DSP, faking a audio card or some solution in Unity API, I need a north. How I'm using the code:
myAudioClip = Microphone.Start ( null, false, 10, 44100 );
To save a audio file I'm using that script: https://gist.github.com/darktable/2317063
And that line:
SavWav.Save("myfile", myAudioClip);
My question is: How to record my application output audio as a input data too in Unity.
You can't do that in Unity. The furthest you can go is record individual AudioClips.
To record system output use NAudio. It's a .NET library, hope it will work on Mono.
Good luck

Multi channel functionality to record mp3 file in c#

I want to have a functionality of recording a conversation between two person. I want to do it in a such a way that the outgoing sound be on 1 channel and incoming sound on another channel. So finally i get a stereo file(mp3) file having 2 channels.
For now I am looking to achieve this is windows form and then eventually target xamarin.forms(android, iOS, windows).
Any way to achieve this in c#? Or any plugin available for this?
FFMPEG is a good tool for video or audio manipulation. I've only used it with video, but looks like it can encode two audio channels. Have a look at
this, hope it is helpful

Using Core Audio API to change volume of rear channels

I'm trying to create a background application that allows me to easily change volumes of the rear channels
I've looked into the Core Audio API, and although I managed to change the balance/volume of the front speakers, the API seemingly had no access to the rear channels or any other surround channel. It only counted 2 channels for my audio device.
Is it in any way possible, using any API, to control the rear channel's volume?
Thanks in advance!
EDIT
Thanks, FMOD looks like what I need, although it's a bit overwhelming. :P What would I need to do, to change the volume of a specified channel. I believe I need this function:
FMOD.RESULT result = channel.setVolume(1.0f);
But then I need to find a way to specify the channel...
Also, to be clear: I need to change the volume of any running application, say Winamp.
Best chose for working with audio file is "Fmod.dll".this have a lot of Privilege to work with audio file.
This is an audio content creation tool for games, with a focus on a
‘Pro Audio’ approach. It has an entirely new interface that will be
more familiar to those using professional Digital Audio Workstations
than existing game audio tools and is loaded with new features.
I already use this,this is very powerful component and easy to use.

Categories

Resources