4 channel audio not fully working

Hi!
I’m trying to figure out how to do multi channel audio in unity, and it looks like something isn’t working correctly.

here is my setup:

  • Blank unity project (unity 2020.3.0f1)
  • Set project settings > audio > default speaker mode to “Quad”
  • Create a 4-channel audio clip with audacity (1 “click” on each channel, one at a time)
  • Import the clip into unity with default settings

I don’t have an external sound card (yet) so I’m using VB-Cable as a virtual 4-channel output

VB-Cable provides a Control panel where I can see the levels for each channel.
Playing back the source file with quicktime, I can see the channel 1,2,3 and 4 levels moving as I expect.
However, playing back the imported audio clip in unity’s asset preview merges channel 1 with 3, and 2 with 4. The same thing happens when playing the audio in-game.

Another setup I’ve tried is the same as above, but setting up my computer to use an “aggregate audio device”:

With this setup, playing back the clip in Quicktime or in the unity asset preview works as expected (I hear the channels 1 and 2 through the Built-in output and “see” the channels 3 and 4 on the VB-Cable control panel).
Playing the clip in-game however, only the channels 1,2 and 3 seem to work. Nothing happens on channel 4 (Even using a unity audio mixer, I can see channels 1,2 and 3 “lighting up” but 4 stays silent)

I know changing audio config with unity opened is not guaranteed to work, so for every test I do, I quit and restart Unity.

I hope I’ve explained the issue properly. If not, I’ve attached a zip file with the test unity project (including the 4 channel audio track), and screen recording of different tests I’ve made. If you need more info, I’ll be happy to provide it for you

System:
MacBook Pro (Retina, 13-inch, Late 2013)
MacOS 11.6.2
16GB RAM
2,8 GHz Dual-Core Intel Core i7

7968651–1022040–unity audio bug.zip (1.6 MB)

this fixed it for me: https://thomasmountainborn.com/2016/06/10/sending-audio-directly-to-a-speaker-in-unity/

Channels 3 and 4 are for center and bass. you have to use channels 5 & 6 for back left and back right speakers.

Your link is broken. I have tried audio clips with audio on 1,2,3,4 and 1,2,5,6 and neither works. I still only get 1,2 and 3 during playback in Unity, but not in asset preview.

Hi ! Yes indeed the link is broken.

I’m currently facing the same issue on Unity (6000.0.45f1)

Here is a 4.0 file that has basically 4 mono channels at the same level, but when it’s played only the 1,2,3 channels are fed, the 4 is silent :

If I change the speaker mode to “Surround” in the audio settings, it seems to work better but I can’t afford 5 outputs.

Maybe a lead to fix that issue would be in the fact that Unity seems to import the Audio Clip as a 3.1 channel layout instead of the 4.0 we want. We can see it displayed in the Audio Clip asset infos at the bottom of your capture (Vorbis, 44100 Hz, 3.1, 00:03.823). I have exactly the same 3.1 instead of 4.0 info.

I’ve tried to encode the channel order in the metadata of the audio file with different layout/naming using ffmpeg but none seems to work, it’s always displayed as a “3.1” file in Unity (in other audio Software the Quad in recognize as a 4.0).

Maybe a Unity Dev could tell us what channel order/layout/encapsulation would be needed in the metadata of the Audio File for Unity to recognize it as a 4.0(L,R,SL,SR) and not 3.1 (L,R,C,Lfe) ?