diff options
Diffstat (limited to 'platform/x11/os_x11.cpp')
-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 ); |