Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Selecting an Audio Device Output From dropdown list.

Discussion in 'Scripting' started by ControlTheNerrativ3, Sep 18, 2022.

  1. ControlTheNerrativ3

    ControlTheNerrativ3

    Joined:
    Mar 5, 2020
    Posts:
    2
    ok so my issue is that im trying to make the settings page for my game.
    i have managed to get the user to pick the speakermode ,sample rate and dsp buffersize but not the audio device.
    i found this thread :
    https://forum.unity.com/threads/selecting-the-audio-output-device.306897/
    but it did not help much.

    there is also this one:
    Unity - Scripting API: AudioSettings.AudioConfigurationChangeHandler (unity3d.com)
    but this is only when the audio device changes have been made from outside unity.

    is there a native way in unity to change the audio device when in game? or do i have to play around with this Fmod plugin?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,969
    My goodness, I really hope that Unity isn't wasting their time on a feature like this when it's already built into every operating system out there!!!!!

    If you wanna fiddle around with this sort of operating-system stuff, hie thee to a good tutorial on native plugin coding for Unity and make yourself some native plugins to expose the functionality to:

    - enumerate audio devices
    - identify the current one
    - select an audio device

    Then break out your UI coding and make whatever setup you want.
     
  3. ControlTheNerrativ3

    ControlTheNerrativ3

    Joined:
    Mar 5, 2020
    Posts:
    2
    thanks!