Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Ybalrid's avatar
Ybalrid
Expert Protege
10 years ago

Feature Request: Getting from code if user want Oculus audio or Windows default

(This question is about LibOVR and not the AudioSDK, that why I post in PC Dev' and not in the Audio subforum ^^")
Hi,

Maybe I missed something,

Inside the device configuration the user can choose to use the integrated rift headphones/mic or the default windows sound device.

I'm not using the Audio SDK (because no public C++ SDK has been released yet...) so I'm working with OpenAL.

The thing I need to know is how to get by code the state of these settings : http://puu.sh/oFT0h/9963f11a0c.png

I've check the OVR headers documentation and I didn't find anything relevent.

If there's no way to do this, please consider this post as a feature request. This could come in handy for other developers. :-p

3 Replies

  • Ybalrid's avatar
    Ybalrid
    Expert Protege
    I edited my post, and I'm rebumping it to see if somebody from Oculus can see this message ^^"
  • Hi, 

    It looks like this will give you the name of the current default device when initializing OpenAL:

    char* DefaultDevice = (char*)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);


    FYI, the Audio SDK is not a full audio runtime, it's mainly a set of various formats of the Oculus Spatializer Plugin for various audio middleware and game engines. The C/C++ SDK provides interfaces for the same plugin. That said, if you would like access to it, you can send a message to Brian Hook and give a brief description of your project (https://forums.oculus.com/community/messages/add/BrianHook).

    Regards,
    Dave

  • Ybalrid's avatar
    Ybalrid
    Expert Protege
    @DaveDriggers I allready know the name of the default audio device, that's not the problem.

    The rift integrated audio is not the default audio device of the system (this is a good thing) so only VR apps will seek to use the Rift for audio.

    The problem is, the user may have changed in the setting of the oculus app, to use VR audio on the Windows default device.

    So, by default it's this :



    But you can remove the headphones with the little tool in the box, and set things like that:



    Under Settings > Devices > Rift Headset.

    I just need to know the state of this setting when I init my OpenAL context to select the correct one, and as far as I searched, LibOVR doesn't expose this.

    I have two proposition :

    1) Being able to get this from ovr_GetBool(), with a parameter like "ovr_useRiftHeadphones" and "ovr_useRiftMicrophone" that returns ovrTrue by default, but ovrFalse if the setting has been altered by the user. (or just being able to get this information from LibOVR)

    2) Make the runtime desactivate the Rift Audio device (headphone or microphone) if the user has put the above settings to "Windows default".

    Because in the current; if I set the audio to "Windows Default" on the Oculus App, the audio device of the rift is still seen as a usable soundcard by Windows. And if I have no way to check what the user set there, I have no way to know what device to use (Rift Audio or Whatever is the default on Windows)

    Am I clear in my explaination this time? (My english is not great)