summaryrefslogtreecommitdiff
path: root/platform/server
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2017-09-13 13:34:22 -0300
committermarcelofg55 <marcelofg55@gmail.com>2017-09-13 20:54:55 -0300
commit7a4c0ff35e10fba5f2686e7fd5623eab31b07a2d (patch)
treeadf99ac4cff62e6898c14834400034cef668e54b /platform/server
parentd6b392825fc3e22d9e0c62f0d17633c4224eb28f (diff)
Fix crash when no audio driver is available
Diffstat (limited to 'platform/server')
-rw-r--r--platform/server/os_server.cpp8
-rw-r--r--platform/server/os_server.h2
2 files changed, 1 insertions, 9 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 44034e815d..f3ed9a582f 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -62,12 +62,7 @@ void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p
//visual_server = memnew( VisualServerRaster(rasterizer) );
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
sample_manager = memnew(SampleManagerMallocSW);
audio_server = memnew(AudioServerSW(sample_manager));
@@ -232,7 +227,6 @@ void OS_Server::run() {
OS_Server::OS_Server() {
- AudioDriverManager::add_driver(&driver_dummy);
//adriver here
grab = false;
};
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index f3db053be3..314167604c 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -34,7 +34,6 @@
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/unix/os_unix.h"
#include "main/input_default.h"
-#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio_server.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_server.h"
@@ -55,7 +54,6 @@ class OS_Server : public OS_Unix {
List<String> args;
MainLoop *main_loop;
- AudioDriverDummy driver_dummy;
bool grab;
PhysicsServer *physics_server;