How can I change the Sound output device?

I’m trying to create a dropbox where I can choose whether to use my headset or the speakers, but I have no idea how to start.

1 Like

Unity always outputs to the default audio device and there’s no way change it.

If you want to play to non-default or multiple audio devices, you’d have to use a plugin (e.g. AudioStream on the asset store) or a third-party audio system like FMOD or Wwise.

1 Like

Sad but true…:face_with_spiral_eyes:
I’m happy to say that it’s something we’re currently looking though!

5 Likes

Thanks, I’ll investigate about it, I love you bro!

1 Like

Dear SeventhString,
If there is any solution developed for Unity Android so far?

1 Like

We’re not there yet, but that’s definitely on the table.

If it’s just the actual feature of playing Unity sounds from a said audio source you can do this via Windows.

In Win 11:

  1. Right click Windows sound icon on bottom right
  2. Select “Volume Mixer/Control”
  3. In the list of apps presented you can press the expand arrow next to the Unity app and then change “Output device” to whatever you want.

Peace

1 Like

My brother in Christ.
You just explained how to change windows sound output on a development forum
That was funny!
Cheers!

7 Likes

any news on this yet?

Nothing to report at this point @niktr96

Stay tuned!

@STARvonSTAR is right, every app in windows 11 can be routed to a different audio device. So also Unity.

Any news on that topic ?

We’re slowly releasing platform by platform the Enhanced Audio Foundation under an experimental flag (-showAudioFoundationUI) to validate that it’s stable with early adopters. Once it’s in good shape, we will most likely add a scriptable API for it, and that should bring good solutions to these audio device problems.
Soon™!

1 Like

Thanks ! How can we become early adopters to test these new features ?

Starting Unity with the argument -showAudioFoundationUI will reveal this section in Project Settings > Audio.

This will allow you to select the Enhanced Audio Foundation, which is currently a transparent feature, in the sense that it shouldn’t change your development experience.
What this will do it substitute the current (now referred to as “Classic”) audio backend for the experimental one (aka “Enhanced”). Starting from 6000.3 it will be available for Windows and Mac, and 6000.4 will bring Android and iOS.

Please feel free to turn it on! If you don’t see a difference, that’s actually good news for now :wink: Our hope with the experimental phase is to identify corner cases and areas of improvement. When we reach a good level of confidence on all platforms, then more features will be exposed.

Cheers!