diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-04-12 16:11:26 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-04-12 16:11:26 -0300 |
commit | 87c51b6fc0504e4943ee3edec5e0fa06097d8b96 (patch) | |
tree | 4bdf94245a152c974c283e0034822143510ca7f9 /platform | |
parent | ab6eaa3de48fb4148ed7f5f51a8fc05a04a69bc4 (diff) |
Modified OSX11 to try alternative audio drivers if pulseaudio does not work or user dislikes lennart potering , fixes #1511
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/os_x11.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 92b0abff37..4dc10c5b36 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -260,7 +260,20 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) { - ERR_PRINT("Initializing audio failed."); + bool success=false; + for(int i=0;i<AudioDriverManagerSW::get_driver_count();i++) { + if (i==p_audio_driver) + continue; + if (AudioDriverManagerSW::get_driver(i)->init()==OK) { + success=true; + print_line("Using alternate audio driver: "+String(AudioDriverManagerSW::get_driver(i)->get_name())); + break; + } + } + if (!success) { + ERR_PRINT("Initializing audio failed."); + } + } sample_manager = memnew( SampleManagerMallocSW ); |