Search Unity

Audio output device selection

Discussion in 'Audio & Video' started by bl4st, Mar 12, 2017.

  1. bl4st

    bl4st

    Joined:
    Feb 19, 2015
    Posts:
    6
    Hi, i am trying to find a way to select the audio output device of my program at runtime, i've searched a bit on the forum / google but i've not been able to find a good answer to this question.
     
  2. bl4st

    bl4st

    Joined:
    Feb 19, 2015
    Posts:
    6
    I am still looking for an answer, but i kinda solved my problem. Unity locks on the default audio output so if you want to play some sound on your headphones and have unity on the speakers for example, all you have to do is to set your speakers as the default output, run your unity program and finally set your headphones as default output. This is what i wanted to do but i couldnt find a way to configure it inside the software. FeelsBadMan.
     
  3. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    i got plugin on the asset store which does it
    currently the non default output device has some troubles on androids but otherwise it should be working on desktop
    it uses the fmod unity package which you have to download and setup independently ( and agree to their terms )

    EDIT: oh it has a caveat - currently no 3d positional audio - so this might not be what you want ;/

    EDIT EDIT: i will have to test 3d when not using streaming and using redirect only
    will reply here then
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    so you can use freely AudioSourceOutputDevice on a common AudioSource and everything including spatialization works
    ( when not using the actual streaming feature form the package - which was the reason it was created.. ])
    /cc @bl4st

    cheers!