7.1 & 5.1 surround sound

Hello,
Wondering if anyone has had any luck building with 7.1 or 5.1 surround sound. We have been working on this and haven’t had any luck. We did file a bug (650039) as the editor was telling us stereo was enabled even though 5.1 was config’d in windows sound settings. anyone else have success with surround and standalone (pc) builds?
thanks
d

1 Like

Does your machine have more than one soundcard? Unity will use the default output device, and if it is the 5.1/7.1 device, you should have Unity use that.

Currently you cannot configure Unity to a different channel count than the output device.

2 Likes

Hi wkaj,

Even with the default output device set up correctly, AudioSettings.driverCaps will only return Stereo.

This is in both editor and standalone on windows 7 in unity 4.5.5

I have attached an image showing my audio setup where you can see the default device is correct and 5.1. Clicking on the speakers in the config display plays sounds out of each individual speaker correctly.

We are also seeing this exact same behaviour on a different machine trying to use 7.1 over S/PDIF.

Simon

1861073--119409--speakers.jpg

2 Likes

Does this mean one couldn’t make an app with different possible sound configurations?

also - is the audio coming out of unity a digital or analog signal? we are evenutally feeding audio from our PC into a receiver. Is this even possible at the moment?

thanks,d

Wkaj - have a sec to answer my questions? many thanks,

1 Like

Same issue happens in Unity 4.6

2 Likes

Does this mean that it isn’t possible to distribute an app that has different sound configurations without having separate builds for each sound configuration?

For our purposes - we are going to try to install unity pro on the target machine & make a build. Will update with the results.

1 Like

I’ve recently had to correct bugs in G-Audio for multi-channel setups. So it’s definitely possible for Unity to output, in the editor as well as in builds, more than 2 channels.

1 Like

Might need to set audio speaker mode in settings, it won’t happen automatically…

1 Like

gregzo,
Are you talking about setting audio speaker mode settings inside unity? (edit/project settings/audio). We have done this already to no avail.
many thanks,
d

1 Like

Hi droderick,

Unfortunately I can’t test as I don’t have a multichannel setup at the moment.
What I can tell you is that one of my users had a bug with my framework G-Audio and his quad setup. After fixing it, he was able to monitor all for channels in the editor.

Someone else in the thread enquired about having to make separate builds for different setups: of course this is not the case.

1 Like

How recently and what platform? As noted we are on 4.5.5 on windows 7.
aaro4130 above is reporting the same issue on 4.6.

We are definitely seeing unexpected behaviour here:

AudioSettings.driverCaps returns Stereo on a correctly configured 5.1 setup.
OnAudioFilterRead messages always have channels as 2.

AudioSettings.driverCaps is independent from AudioSettings.speakerMode (and have tried a bunch of different settings anyway)

If you did, you would be seeing the same issue.

Using an FMOD Studio native plugin detects all the channels correctly, so this is not an issue with the sound drivers or configuration either.

2 Likes

Hi @simonmc

I did not want to imply that your problem isn’t real, simply that some users seem to have had success with their setup ( in Unity 4.5 ).

I hope your bug reports will help in getting this issue solved quickly.

Cheers,

Gregzo

1 Like

What’s odd - is that Unity stopped contributing to this post. Maybe they view it as a feature that is unsupported (and not a bug?).

1 Like

Doesn’t mean much. @wkaj is one of the 2 audio devs working at Unity - I’d say he’s just very busy with Unity5’s imminent release.

1 Like

Hi all, we are also working on a 5.1 setup, Win7, standalone.
It just comes out of Unity in stereo even though everything in Windows is tested and OK 5.1.

We had already promised our client 5.1, so what we would like to know: is this definitely not going to work? And will it work in Unity5?

best regards
Wouter
YiPP

1 Like

What we’ve found is that Unity 4.3 Editor, Unity 5 Editor beta versions and Unity 5 beta builds are selective about which hardware drivers it will send 5.1 to. We’ve tested 6 surround configurations on PCs and Xbox1 and have 3 instances of of surround 5.1 working. All other things being the same except driver/hardware selections in Control Panels…it seems that motherboard hosted audio outputs work and third party hardware and drivers don’t. Drivers/Hardware for RME, Focusrite and an HTC Claro sound card to not work. Analog outs on MSI and Asus motherboards do…as well as Xbox One. It should be noted that on the systems that didn’t pass 5.1…all of them passed 5.1 for other applications with no special configurations. Windows, Steam, other game engines in development, audio applications…none of them had issues with surround. We have elevated the issue to Unity through various communications, but I’m looking create momentum to fix this where I can. We’d love to see a resolution this very very soon…b/c we’re very close to shipping:)

1 Like

andrew,
fwiw, we put a new soundblaster card in our machine and have things working correctly now. turns out, our issue at least was related to the card & sound system we had. We’re building an app for ONE machine so ‘our’ problem is sorted, but yes, there do appear to be oddities & a lack of documentation around how sound other than stereo works in unity.
best of luck,
d

Was having trouble getting Surround Sound to work. Was using the onboard optical and coax out with no luck.
Switched to using NVIDIA audio through display port on video card and voila!

Hey everyone,

I’ve been testing various surround settings (My team and I are on 4.5.5) and I can confirm that setting your speaker mode through Project Settings → AudioManger is buggy and very unreliable!

My advice, don’t use it!! Hard code your speaker settings instead, I haven’t had any issues with it yet.

Attached is a GameObject prefab called AudioEngine which exposes various audio hardware settings in the inspector such as sample rate, buffer size, and speaker output. There is a check box for force surround, if set to true it will set speaker output to 5.1. You can pop into the script and change it very easily to 7.1 or whatever settings you want. Currently it defaults to your driver’s capabilities.

Keep in mind, this script resets Unity’s audio system, so initialize this in a startup scene for your builds.

Hopefully this will help some of you guys.

Cheers!

-Andrew

1951164–126188–AudioEngine.zip (2.08 KB)