summaryrefslogtreecommitdiff
path: root/platform/uwp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-01-16 19:19:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-01-16 19:19:45 +0100
commit7b059965e8df745c5b45b4ec6bfbdfe1a7397642 (patch)
treebdba6b41f51fcb4c8aa5178aebd378bdf97b93a8 /platform/uwp
parent6a3dae5be944d9e226cca7bf0bd80fb0036e8324 (diff)
Adapt platforms to AudioServer refactoring
Fixes compilation on Windows and likely other platforms (at least as far as AudioServer changes were concerned), though they were not tested.
Diffstat (limited to 'platform/uwp')
-rw-r--r--platform/uwp/os_uwp.cpp29
-rw-r--r--platform/uwp/os_uwp.h19
2 files changed, 6 insertions, 42 deletions
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 831b129bdc..90c21e11a1 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -36,16 +36,12 @@
#include "main/main.h"
#include "drivers/windows/file_access_windows.h"
#include "drivers/windows/dir_access_windows.h"
-
-
#include "servers/visual/visual_server_raster.h"
-#include "servers/audio/audio_server_sw.h"
-#include "servers/visual/visual_server_wrap_mt.h"
-
+#include "servers/audio_server.h"
+//#include "servers/visual/visual_server_wrap_mt.h"
#include "os/memory_pool_dynamic_prealloc.h"
#include "globals.h"
#include "io/marshalls.h"
-
#include "platform/windows/packet_peer_udp_winsock.h"
#include "platform/windows/stream_peer_winsock.h"
#include "platform/windows/tcp_server_winsock.h"
@@ -147,6 +143,7 @@ int OSUWP::get_audio_driver_count() const {
return AudioDriverManager::get_driver_count();
}
+
const char * OSUWP::get_audio_driver_name(int p_driver) const {
AudioDriver* driver = AudioDriverManager::get_driver(p_driver);
@@ -295,16 +292,6 @@ void OSUWP::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio
ERR_PRINT("Initializing audio failed.");
}
- 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();
-
managed_object->update_clipboard();
Clipboard::ContentChanged += ref new EventHandler<Platform::Object^>(managed_object, &ManagedType::on_clipboard_changed);
@@ -407,22 +394,12 @@ void OSUWP::finalize() {
if (rasterizer)
memdelete(rasterizer);
- spatial_sound_server->finish();
- memdelete(spatial_sound_server);
- spatial_sound_2d_server->finish();
- memdelete(spatial_sound_2d_server);
-
/*
if (debugger_connection_console) {
memdelete(debugger_connection_console);
}
*/
- memdelete(sample_manager);
-
- audio_server->finish();
- memdelete(audio_server);
-
memdelete(input);
physics_server->finish();
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index f9e050e7a3..f65aa2d8d9 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -34,28 +34,19 @@
#include "servers/visual_server.h"
#include "servers/visual/rasterizer.h"
#include "servers/physics/physics_server_sw.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 "servers/physics_2d/physics_2d_server_sw.h"
#include "drivers/xaudio2/audio_driver_xaudio2.h"
-
#include "gl_context_egl.h"
-
#include "core/math/math_2d.h"
#include "core/ustring.h"
+#include "main/input_default.h"
+#include "joypad_uwp.h"
#include <windows.h>
-
#include <io.h>
-
#include <fcntl.h>
#include <stdio.h>
-#include "main/input_default.h"
-
-#include "joypad_uwp.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
@@ -119,10 +110,6 @@ private:
MainLoop *main_loop;
AudioDriverXAudio2 audio_driver;
- AudioServerSW *audio_server;
- SampleManagerMallocSW *sample_manager;
- SpatialSoundServerSW *spatial_sound_server;
- SpatialSound2DServerSW *spatial_sound_2d_server;
MouseMode mouse_mode;
bool alt_mem;