0
\$\begingroup\$

I've trying to bring in surround sound audio into my project. I've set my computer up to run in 5.1 and when I play a 6 channel audio through windows media player (it's a test audio that does left speaker, right speaker etc) it works fine.

However, when I run it through Unity, all I get is the front 3 channels. I've set it in the Edit -> project settings -> audio to be 5.1 in there. I even set it in code with following:

void Start() { AudioSettings.speakerMode = AudioSpeakerMode.Mode5point1; } How ever, when I run a debug line of:

print ( AudioSettings.driverCaps); It tells me that Unity is only playing in stereo. Is there something I'm still not doing?

I should also add I've ran 10 different tests using the 3D audio pan and spread options. I've set both to either being fully off, half way on and full. Still the same results.

\$\endgroup\$
1
\$\begingroup\$

Taking a quick look at the AudioSettings reference, it says that AudioSettings.driverCaps gives the speaker mode capability of the current audio driver. If the current audio driver is only capable of stereo playback, then that's why you aren't hearing 5.1. Try debug printing the value of AudioSettings.speakerMode to see what's actually set. The speakerMode reference says: "If a speaker mode is set beyond the drivers capability, the audio behaviour is undefined."

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.