summaryrefslogtreecommitdiff
path: root/platform/windows
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/windows
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/windows')
-rw-r--r--platform/windows/os_windows.cpp35
-rw-r--r--platform/windows/os_windows.h18
2 files changed, 9 insertions, 44 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index c15f5225d9..6439de67a6 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -30,30 +30,25 @@
#include "os_windows.h"
#include "drivers/gles3/rasterizer_gles3.h"
-
#include "drivers/windows/thread_windows.h"
#include "drivers/windows/semaphore_windows.h"
#include "drivers/windows/mutex_windows.h"
#include "drivers/windows/rw_lock_windows.h"
-#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/audio_server.h"
//#include "servers/visual/visual_server_wrap_mt.h"
-
+#include "main/main.h"
#include "tcp_server_winsock.h"
#include "packet_peer_udp_winsock.h"
#include "stream_peer_winsock.h"
#include "lang_table.h"
-
#include "globals.h"
#include "io/marshalls.h"
#include "joypad.h"
-#include "shlobj.h"
+#include <shlobj.h>
#include <regstr.h>
#include <process.h>
@@ -1131,16 +1126,6 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_
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();
-
TRACKMOUSEEVENT tme;
tme.cbSize=sizeof(TRACKMOUSEEVENT);
tme.dwFlags=TME_LEAVE;
@@ -1271,22 +1256,12 @@ void OS_Windows::finalize() {
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)user_proc);
};
- 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);
-
physics_server->finish();
memdelete(physics_server);
@@ -2432,10 +2407,10 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) {
user_proc = NULL;
#ifdef RTAUDIO_ENABLED
- AudioDriverManagerSW::add_driver(&driver_rtaudio);
+ AudioDriverManager::add_driver(&driver_rtaudio);
#endif
#ifdef XAUDIO2_ENABLED
- AudioDriverManagerSW::add_driver(&driver_xaudio2);
+ AudioDriverManager::add_driver(&driver_xaudio2);
#endif
}
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 7ca89e6366..a5c8ecbe1b 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -35,29 +35,24 @@
#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/audio_server.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#ifdef XAUDIO2_ENABLED
#include "drivers/xaudio2/audio_driver_xaudio2.h"
#endif
-#include "servers/spatial_sound/spatial_sound_server_sw.h"
-#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
#include "drivers/unix/ip_unix.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
-
#include "main/input_default.h"
+#include "key_mapping_win.h"
-#include <windows.h>
-#include "key_mapping_win.h"
+#include <windows.h>
#include <windowsx.h>
#include <io.h>
-
#include <fcntl.h>
#include <stdio.h>
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -116,11 +111,6 @@ class OS_Windows : public OS {
WNDPROC user_proc;
- AudioServerSW *audio_server;
- SampleManagerMallocSW *sample_manager;
- SpatialSoundServerSW *spatial_sound_server;
- SpatialSound2DServerSW *spatial_sound_2d_server;
-
MouseMode mouse_mode;
bool alt_mem;
bool gr_mem;