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

log to console if falling back to dummy audio driver #21400

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

rfht
Copy link
Contributor

@rfht rfht commented Aug 25, 2018

Since dummy audio driver now seems to serve as fallback, I think it should be visible when other audio drivers fail. This diff logs it with print_line(); main alternative would be alert() but that seemed too intrusive for my taste.

@rfht rfht requested a review from reduz as a code owner August 25, 2018 07:49
main/main.cpp Outdated
@@ -917,6 +917,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
audio_driver = GLOBAL_DEF_RST("audio/driver", OS::get_singleton()->get_audio_driver_name(0));
}

if (audio_driver == "Dummy") {
print_line("Failed to attach audio driver. Falling back to dummy driver.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that it will print that all the time with the server platform, where it's using the Dummy driver on purpose, not because other drivers failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add this on the AudioServer code rather than on the Main code. Something like this should do the trick: https://gist.github.com/marcelofg55/a11c015d758a4b3372a8375c068c1b01

@akien-mga
Copy link
Member

CC @marcelofg55

@akien-mga
Copy link
Member

Could you squash the commits?

@akien-mga akien-mga merged commit 1fe6ad6 into godotengine:master Aug 27, 2018
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants