Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sound is played on the wrong audio device when launch via Air Link with Oculus SDK #228

Open
graynk opened this issue Jul 29, 2022 · 1 comment
Labels
discussion Something we need to discuss documentation Improvements or additions to documentation Oculus Related to Oculus Runtime (including mobile)

Comments

@graynk
Copy link

graynk commented Jul 29, 2022

I'm using Godot 3.4 on Windows 10 with Oculus Quest 2 connected via Air Link.

The Air Link creates a separate audio device for the HMD: Oculus Virtual Audio Device. All of the games using Oculus SDK (Beat Saber, Pavlov, etc) auto-select that device and I can hear the sound from the game without changing the default audio output for my PC.
However, when I launch my Godot project with Oculus SDK, the game still plays sound to that default audio output, not to the Oculus one, so no sound is there unless I capture the desktop.

If I launch the game via SteamVR everything works fine.

I can upload the video of the bug in action, if it's necessary

@BastiaanOlij BastiaanOlij added documentation Improvements or additions to documentation Oculus Related to Oculus Runtime (including mobile) discussion Something we need to discuss labels Sep 23, 2022
@BastiaanOlij
Copy link
Member

OpenXR has no APIs that would inform us of which audio output to use.

SteamVR will change the default audio output to the headset when SteamVR starts. One would assume that Airlink would do the same, this was definitely the behavior of the Rift and Rift S when the Oculus client starts.

Godot indeed by default outputs to the default audio device and has no idea to do otherwise. Code will need to be added that switches this but again, the OpenXR plugin has no influence on this, it would need to be solved in your game (and possibly something we could add to the default startup script).

This can be achieved by changing the audio output to the correct device through the AudioServer:
https://docs.godotengine.org/en/stable/classes/class_audioserver.html#class-audioserver-property-device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Something we need to discuss documentation Improvements or additions to documentation Oculus Related to Oculus Runtime (including mobile)
Projects
None yet
Development

No branches or pull requests

2 participants