summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/audio_driver_jandroid.cpp2
-rw-r--r--platform/android/audio_driver_jandroid.h2
-rw-r--r--platform/android/audio_driver_opensl.cpp2
-rw-r--r--platform/android/audio_driver_opensl.h2
-rw-r--r--platform/android/os_android.cpp6
-rw-r--r--platform/bb10/audio_driver_bb10.cpp2
-rw-r--r--platform/bb10/audio_driver_bb10.h2
-rw-r--r--platform/haiku/os_haiku.cpp4
-rw-r--r--platform/iphone/audio_driver_iphone.cpp2
-rw-r--r--platform/iphone/audio_driver_iphone.h2
-rw-r--r--platform/javascript/audio_driver_javascript.cpp2
-rw-r--r--platform/javascript/audio_driver_javascript.h2
-rw-r--r--platform/javascript/os_javascript.cpp2
-rw-r--r--platform/osx/os_osx.mm6
-rw-r--r--platform/server/os_server.cpp6
-rw-r--r--platform/uwp/os_uwp.cpp12
-rw-r--r--platform/windows/os_windows.cpp10
-rw-r--r--platform/x11/os_x11.cpp46
-rw-r--r--platform/x11/os_x11.h10
19 files changed, 49 insertions, 73 deletions
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index d9e40a5913..a041678c0c 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -199,7 +199,7 @@ int AudioDriverAndroid::get_mix_rate() const {
return mix_rate;
}
-AudioDriverSW::OutputFormat AudioDriverAndroid::get_output_format() const{
+AudioDriver::OutputFormat AudioDriverAndroid::get_output_format() const{
return OUTPUT_STEREO;
}
diff --git a/platform/android/audio_driver_jandroid.h b/platform/android/audio_driver_jandroid.h
index 01ce31be8f..bdb59c76fd 100644
--- a/platform/android/audio_driver_jandroid.h
+++ b/platform/android/audio_driver_jandroid.h
@@ -34,7 +34,7 @@
#include "java_glue.h"
-class AudioDriverAndroid : public AudioDriverSW {
+class AudioDriverAndroid : public AudioDriver {
static Mutex *mutex;
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index 7aec2b174e..7a9f6f73f9 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -373,7 +373,7 @@ int AudioDriverOpenSL::get_mix_rate() const {
return 44100;
}
-AudioDriverSW::OutputFormat AudioDriverOpenSL::get_output_format() const{
+AudioDriver::OutputFormat AudioDriverOpenSL::get_output_format() const{
return OUTPUT_STEREO;
}
diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h
index 8839d20bab..4915129041 100644
--- a/platform/android/audio_driver_opensl.h
+++ b/platform/android/audio_driver_opensl.h
@@ -37,7 +37,7 @@
#include "SLES/OpenSLES_Android.h"
-class AudioDriverOpenSL : public AudioDriverSW {
+class AudioDriverOpenSL : public AudioDriver {
bool active;
Mutex *mutex;
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 562666b679..c40e07b450 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -129,7 +129,7 @@ void OS_Android::initialize(const VideoMode& p_desired,int p_video_driver,int p_
if (gfx_init_func)
gfx_init_func(gfx_init_ud,use_gl2);
- AudioDriverManagerSW::add_driver(&audio_driver_android);
+ AudioDriverManager::add_driver(&audio_driver_android);
RasterizerGLES2 *rasterizer_gles22=memnew( RasterizerGLES2(false,use_reload_hooks,false,use_reload_hooks ) );
@@ -147,9 +147,9 @@ void OS_Android::initialize(const VideoMode& p_desired,int p_video_driver,int p_
visual_server->init();
visual_server->cursor_set_visible(false, 0);
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
ERR_PRINT("Initializing audio failed.");
}
diff --git a/platform/bb10/audio_driver_bb10.cpp b/platform/bb10/audio_driver_bb10.cpp
index 7b5c0800a8..6a56bfdbf0 100644
--- a/platform/bb10/audio_driver_bb10.cpp
+++ b/platform/bb10/audio_driver_bb10.cpp
@@ -204,7 +204,7 @@ int AudioDriverBB10::get_mix_rate() const {
return mix_rate;
};
-AudioDriverSW::OutputFormat AudioDriverBB10::get_output_format() const {
+AudioDriver::OutputFormat AudioDriverBB10::get_output_format() const {
return output_format;
};
diff --git a/platform/bb10/audio_driver_bb10.h b/platform/bb10/audio_driver_bb10.h
index 738bcf2619..bede583097 100644
--- a/platform/bb10/audio_driver_bb10.h
+++ b/platform/bb10/audio_driver_bb10.h
@@ -33,7 +33,7 @@
#include <sys/asoundlib.h>
-class AudioDriverBB10 : public AudioDriverSW {
+class AudioDriverBB10 : public AudioDriver {
Thread* thread;
Mutex* mutex;
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 176e1b0fbc..c5d2dbde85 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -138,9 +138,9 @@ void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_
//physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>();
physics_2d_server->init();
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init() != OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
ERR_PRINT("Initializing audio failed.");
}
diff --git a/platform/iphone/audio_driver_iphone.cpp b/platform/iphone/audio_driver_iphone.cpp
index 556576cdc3..6c91ed8712 100644
--- a/platform/iphone/audio_driver_iphone.cpp
+++ b/platform/iphone/audio_driver_iphone.cpp
@@ -155,7 +155,7 @@ int AudioDriverIphone::get_mix_rate() const {
return 44100;
};
-AudioDriverSW::OutputFormat AudioDriverIphone::get_output_format() const {
+AudioDriver::OutputFormat AudioDriverIphone::get_output_format() const {
return OUTPUT_STEREO;
};
diff --git a/platform/iphone/audio_driver_iphone.h b/platform/iphone/audio_driver_iphone.h
index cbcb0cffce..f127ac7b21 100644
--- a/platform/iphone/audio_driver_iphone.h
+++ b/platform/iphone/audio_driver_iphone.h
@@ -30,7 +30,7 @@
#include <AudioUnit/AudioUnit.h>
-class AudioDriverIphone : public AudioDriverSW {
+class AudioDriverIphone : public AudioDriver {
AudioComponentInstance audio_unit;
bool active;
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index af9f28169b..71332c897e 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -62,7 +62,7 @@ int AudioDriverJavaScript::get_mix_rate() const {
return 44100;
}
-AudioDriverSW::OutputFormat AudioDriverJavaScript::get_output_format() const{
+AudioDriver::OutputFormat AudioDriverJavaScript::get_output_format() const{
return OUTPUT_STEREO;
}
diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h
index 528b45569d..572d24b4fc 100644
--- a/platform/javascript/audio_driver_javascript.h
+++ b/platform/javascript/audio_driver_javascript.h
@@ -33,7 +33,7 @@
#include "servers/audio/audio_server_sw.h"
#include "os/mutex.h"
-class AudioDriverJavaScript : public AudioDriverSW {
+class AudioDriverJavaScript : public AudioDriver {
public:
void set_singleton();
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index fed9598096..2aa7aa2864 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -234,7 +234,7 @@ void OS_JavaScript::initialize(const VideoMode& p_desired,int p_video_driver,int
print_line("Init Audio");
- AudioDriverManagerSW::add_driver(&audio_driver_javascript);
+ AudioDriverManager::add_driver(&audio_driver_javascript);
if (true) {
RasterizerGLES2 *rasterizer_gles22=memnew( RasterizerGLES2(false,false,false,false) );;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 5750e19c87..e863104205 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1083,7 +1083,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
- AudioDriverManagerSW::add_driver(&audio_driver_osx);
+ AudioDriverManager::add_driver(&audio_driver_osx);
// only opengl support here...
RasterizerGLES3::register_config();
@@ -1102,9 +1102,9 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
visual_server->init();
visual_server->cursor_set_visible(false, 0);
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
ERR_PRINT("Initializing audio failed.");
}
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 6b91a5ce77..d691ae35bd 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -61,9 +61,9 @@ void OS_Server::initialize(const VideoMode& p_desired,int p_video_driver,int p_a
//visual_server = memnew( VisualServerRaster(rasterizer) );
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
ERR_PRINT("Initializing audio failed.");
}
@@ -237,7 +237,7 @@ void OS_Server::run() {
OS_Server::OS_Server() {
- AudioDriverManagerSW::add_driver(&driver_dummy);
+ AudioDriverManager::add_driver(&driver_dummy);
//adriver here
grab=false;
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 9dd745716e..831b129bdc 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -145,13 +145,13 @@ void OSUWP::set_keep_screen_on(bool p_enabled) {
int OSUWP::get_audio_driver_count() const {
- return AudioDriverManagerSW::get_driver_count();
+ return AudioDriverManager::get_driver_count();
}
const char * OSUWP::get_audio_driver_name(int p_driver) const {
- AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
+ AudioDriver* driver = AudioDriverManager::get_driver(p_driver);
ERR_FAIL_COND_V( !driver, "" );
- return AudioDriverManagerSW::get_driver(p_driver)->get_name();
+ return AudioDriverManager::get_driver(p_driver)->get_name();
}
static MemoryPoolStatic *mempool_static=NULL;
@@ -288,9 +288,9 @@ void OSUWP::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio
joypad = ref new JoypadUWP(input);
joypad->register_events();
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
ERR_PRINT("Initializing audio failed.");
}
@@ -971,7 +971,7 @@ OSUWP::OSUWP() {
mouse_mode_changed = CreateEvent(NULL, TRUE, FALSE, L"os_mouse_mode_changed");
- AudioDriverManagerSW::add_driver(&audio_driver);
+ AudioDriverManager::add_driver(&audio_driver);
}
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 8910b23a2e..c15f5225d9 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -158,13 +158,13 @@ OS::VideoMode OS_Windows::get_default_video_mode() const {
int OS_Windows::get_audio_driver_count() const {
- return AudioDriverManagerSW::get_driver_count();
+ return AudioDriverManager::get_driver_count();
}
const char * OS_Windows::get_audio_driver_name(int p_driver) const {
- AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
+ AudioDriver* driver = AudioDriverManager::get_driver(p_driver);
ERR_FAIL_COND_V( !driver, "" );
- return AudioDriverManagerSW::get_driver(p_driver)->get_name();
+ return AudioDriverManager::get_driver(p_driver)->get_name();
}
@@ -1124,9 +1124,9 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_
input = memnew( InputDefault );
joypad = memnew (JoypadWindows(input, &hWnd));
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
ERR_PRINT("Initializing audio failed.");
}
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 13e01ab6ac..6525af68d2 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -82,14 +82,14 @@ OS::VideoMode OS_X11::get_default_video_mode() const {
}
int OS_X11::get_audio_driver_count() const {
- return AudioDriverManagerSW::get_driver_count();
+ return AudioDriverManager::get_driver_count();
}
const char *OS_X11::get_audio_driver_name(int p_driver) const {
- AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
+ AudioDriver* driver = AudioDriverManager::get_driver(p_driver);
ERR_FAIL_COND_V( !driver, "" );
- return AudioDriverManagerSW::get_driver(p_driver)->get_name();
+ return AudioDriverManager::get_driver(p_driver)->get_name();
}
void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
@@ -269,21 +269,21 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
XFree(xsh);
}
- AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+ AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
audio_driver_index=p_audio_driver;
- if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+ if (AudioDriverManager::get_driver(p_audio_driver)->init()!=OK) {
bool success=false;
audio_driver_index=-1;
- for(int i=0;i<AudioDriverManagerSW::get_driver_count();i++) {
+ for(int i=0;i<AudioDriverManager::get_driver_count();i++) {
if (i==p_audio_driver)
continue;
- AudioDriverManagerSW::get_driver(i)->set_singleton();
- if (AudioDriverManagerSW::get_driver(i)->init()==OK) {
+ AudioDriverManager::get_driver(i)->set_singleton();
+ if (AudioDriverManager::get_driver(i)->init()==OK) {
success=true;
- print_line("Audio Driver Failed: "+String(AudioDriverManagerSW::get_driver(p_audio_driver)->get_name()));
- print_line("Using alternate audio driver: "+String(AudioDriverManagerSW::get_driver(i)->get_name()));
+ print_line("Audio Driver Failed: "+String(AudioDriverManager::get_driver(p_audio_driver)->get_name()));
+ print_line("Using alternate audio driver: "+String(AudioDriverManager::get_driver(i)->get_name()));
audio_driver_index=i;
break;
}
@@ -294,14 +294,6 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
}
- sample_manager = memnew( SampleManagerMallocSW );
- audio_server = memnew( AudioServerSW(sample_manager) );
- audio_server->init();
- spatial_sound_server = memnew( SpatialSoundServerSW );
- spatial_sound_server->init();
- spatial_sound_2d_server = memnew( SpatialSound2DServerSW );
- spatial_sound_2d_server->init();
-
ERR_FAIL_COND(!visual_server);
ERR_FAIL_COND(x11_window==0);
@@ -469,10 +461,6 @@ void OS_X11::finalize() {
memdelete(main_loop);
main_loop=NULL;
- spatial_sound_server->finish();
- memdelete(spatial_sound_server);
- spatial_sound_2d_server->finish();
- memdelete(spatial_sound_2d_server);
/*
if (debugger_connection_console) {
@@ -485,10 +473,6 @@ void OS_X11::finalize() {
#endif
memdelete(input);
- memdelete(sample_manager);
-
- audio_server->finish();
- memdelete(audio_server);
visual_server->finish();
memdelete(visual_server);
@@ -1984,20 +1968,20 @@ void OS_X11::set_context(int p_context) {
OS_X11::OS_X11() {
#ifdef RTAUDIO_ENABLED
- AudioDriverManagerSW::add_driver(&driver_rtaudio);
+ AudioDriverManager::add_driver(&driver_rtaudio);
#endif
#ifdef PULSEAUDIO_ENABLED
- AudioDriverManagerSW::add_driver(&driver_pulseaudio);
+ AudioDriverManager::add_driver(&driver_pulseaudio);
#endif
#ifdef ALSA_ENABLED
- AudioDriverManagerSW::add_driver(&driver_alsa);
+ AudioDriverManager::add_driver(&driver_alsa);
#endif
- if(AudioDriverManagerSW::get_driver_count() == 0){
+ if(AudioDriverManager::get_driver_count() == 0){
WARN_PRINT("No sound driver found... Defaulting to dummy driver");
- AudioDriverManagerSW::add_driver(&driver_dummy);
+ AudioDriverManager::add_driver(&driver_dummy);
}
minimized = false;
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index bf676b5edf..3245df32c6 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -37,10 +37,7 @@
//#include "servers/visual/visual_server_wrap_mt.h"
#include "servers/visual/rasterizer.h"
#include "servers/physics_server.h"
-#include "servers/audio/audio_server_sw.h"
-#include "servers/audio/sample_manager_sw.h"
-#include "servers/spatial_sound/spatial_sound_server_sw.h"
-#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
+#include "servers/audio_server.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
@@ -135,11 +132,6 @@ class OS_X11 : public OS_Unix {
virtual void delete_main_loop();
IP_Unix *ip_unix;
- AudioServerSW *audio_server;
- SampleManagerMallocSW *sample_manager;
- SpatialSoundServerSW *spatial_sound_server;
- SpatialSound2DServerSW *spatial_sound_2d_server;
-
bool force_quit;
bool minimized;