Xenko

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • Manual
  • API
  • Release notes
    Show / Hide Table of Contents

    Set an audio device

    Advanced Programmer

    You can set which audio device Xenko uses. For example, you can access the Oculus Rift audio device from your custom game constructor.

    If you don't specify a device, Xenko uses the default audio advice.

    Example code

    This code sets the Oculus Rift device at runtime:

    namespace OculusRenderer
    {
        public class OculusGame : Game
        {
            public OculusGame()
            {
                var deviceName = OculusOvr.GetAudioDeviceFullName();
                var deviceUuid = new AudioDevice { Name = deviceName };
                Audio.RequestedAudioDevice = deviceUuid;
            }
        }
    }
    

    See also

    • Global audio settings
    • Improve this Doc

    Back to top

    Copyright © 2016 Silicon Studio
    Generated by DocFX