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

Bug No Audio on AWS Nvidia CloudXR

Discussion in 'Audio & Video' started by StefanSigl, Mar 31, 2023.

  1. StefanSigl

    StefanSigl

    Joined:
    Oct 29, 2019
    Posts:
    4
    My Unity3D Apps do not have any audio output on an AWS instance that is configured for CloudXR
    I figure that could be a Unity Problem because i hear audio just fine if i try other games for example "The Lab"
    Debugging says that the system is capable of audio output and capabilities is set to stereo.

    Probably Unity choose the wrong output device since AWS has a virtual Audio device that is then captured by CloudXR and streamed to the Client but thats just a hypotheses sind i did not found any way to manually select an output device in a unity build ...

    Unity Version 2021.3.20f1

    Any Ideas ?
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    305
    Good question... Unity generally hooks itself to the default device and sadly, there is no simple (nor free) way to select one specifically with our current API.

    Are you able to change the default output device on your instance?
     
  3. StefanSigl

    StefanSigl

    Joined:
    Oct 29, 2019
    Posts:
    4
    There is only these two devices .. tested both ... maybe its not the device selection ... i have currently no clue where to start looking for a solution.
    upload_2023-4-3_8-22-9.png

    Update;

    is there a way to log out which audio device is used? just to be sure
     
    Last edited: Apr 3, 2023
  4. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    305
    Not really... this part needs a little more love... we're working on it in fact... Straight from Unity the best I could recommend is looking at AudioSettings.

    On the other hand, you could try using NAudio to get the information, something like:

    Code (CSharp):
    1. using System;
    2. using NAudio.CoreAudioApi;
    3.  
    4. class DefaultAudioDeviceDetector
    5. {
    6.     public static void Main(string[] args)
    7.     {
    8.         MMDeviceEnumerator enumerator = new MMDeviceEnumerator();
    9.         MMDevice defaultDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console);
    10.  
    11.         Console.WriteLine("Default audio playback device:");
    12.         Console.WriteLine("Name: " + defaultDevice.FriendlyName);
    13.         Console.WriteLine("ID: " + defaultDevice.ID);
    14.     }
    15. }
    16.  
     
    StefanSigl likes this.