Search Unity

How to not send a sound to the LFE channel and enforce center channel

Discussion in 'Audio & Video' started by ReaktorDave, Nov 19, 2015.

  1. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    I have a mono sound file (dialogue line of a narrator) and want to exactly pin that to the center channel without anything being sent to the LFE channel. I'm using a 7.1 setup.

    I managed to play back the sound from the center channel by setting spatial blend to "3D" and setting the volume rolloff to a constant of "1". The Audiosource component is on a child gameobject set to position(0,0,0) of the gameobject holding the audiolistener component.
    This way, the sound gets played back from the center channel peaking at -9dB. However, the sound is also played back from the left channel peaking at -39dB and from the LFE channel peaking at -9dB.

    How can I make Unity to play the sound only at the center channel?
     
  2. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    I was able to eliminate the problem with the sound being sent to the left channel by moving the sound source 1 unit in front of the camera. This completely eliminates the problem in playing mode, but not in edit mode. The problem can be solved in edit mode by double clicking on the sound source or the camera, which makes the editor zoom onto the object. Then, the sound will not be played back from the left channel. Zooming out to the entire background however still plays the sound from the left channel. Can anyone think of a reasonable explanation?

    The problem that the sound is also played back from the LFE channel remains. How can I get control over the amount being sent to the LFE channel?
     
    Last edited: Nov 25, 2015
  3. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    I have been scratching my head with the same issue. Unfortunately there seems to be no native method to control what goes into LFE channel, nor the level of it.

    There is a workaround that involves using Audio mixer. You also need to download and install the native audio plugins:
    http://files.unity3d.com/janm/UnityNativeAudioPluginSDK.zip

    There is a plugin called "Demo LevelMixer". Insert that into the mixer channel with the narrators voice.

    I hope this helps
     
  4. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    You could always make a custom audio filter for it as well using OnAudioFilterRead. It's not always ideal because audio filters tend to make the audio much more vulnerable to the garbage collector, but if your game doesn't generate too much that might not be a problem.