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

Readd methods to query the list of available audio drivers in Godot 4 #9858

Open
Variable-ind opened this issue Jun 1, 2024 · 2 comments
Open

Comments

@Variable-ind
Copy link

Describe the project you are working on

Hy, I'm updating a project (it's a pixelorama extension) from Godot 3 to 4

Describe the problem or limitation you are having in your project

i am unable to find any equivalent of

OS.get_audio_driver_count()
OS.get_audio_driver_name()

I know that you can set the audio server from command line but it'll become annoying for the users of my extension so i prefer not to use it

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It makes selecting/changing audio drivers easy for the user. This way they can just select it from a list of options instead of manually finding out what drivers they have

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Same as how it works in godot 4

If this enhancement will not be used often, can it be worked around with a few lines of script?

For now I've changed my script to now only select between the Dummy and System Default driver

Is there a reason why this should be core and not an add-on in the asset library?

Because it is in Godot 3

@Calinou Calinou changed the title No way to get available audio drivers in godot 4 Readd methods to query the list of available audio drivers in Godot 4 Jun 1, 2024
@AThousandShips
Copy link
Member

AThousandShips commented Jun 1, 2024

This way they can just select it from a list of options instead of manually finding out what drivers they have

But there's no code options for setting the driver, so where would this be used? Other than from the command line, shouldn't this proposal also include that? You'd still have to set it from the command line unless you update the settings and restart I suppose

@Calinou
Copy link
Member

Calinou commented Jun 1, 2024

But there's no code options for setting the driver, so where would this be used? Other than from the command line, shouldn't this proposal also include that? You'd still have to set it from the command line unless you update the settings and restart I suppose

You can write an override.cfg file from your Godot project in the folder containing the executable (or at the root of user:// for a location that is guaranteed to be writable). It'll be used the next time the project starts. This approach works for changing rendering drivers/methods too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants