summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/math/camera_matrix.cpp16
-rw-r--r--platform/osx/audio_driver_osx.cpp4
-rw-r--r--platform/osx/audio_driver_osx.h6
-rw-r--r--platform/osx/os_osx.h9
-rw-r--r--platform/osx/os_osx.mm22
5 files changed, 14 insertions, 43 deletions
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index cbf21cec4d..7669356f5e 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -198,20 +198,20 @@ void CameraMatrix::get_viewport_size(float& r_width, float& r_height) const {
Plane near_plane=Plane(matrix[ 3] + matrix[ 2],
matrix[ 7] + matrix[ 6],
matrix[11] + matrix[10],
- -matrix[15] - matrix[14])
+ -matrix[15] - matrix[14]);
near_plane.normalize();
///////--- Right Plane ---///////
Plane right_plane=Plane(matrix[ 3] - matrix[ 0],
matrix[ 7] - matrix[ 4],
matrix[11] - matrix[ 8],
- - matrix[15] + matrix[12])
+ - matrix[15] + matrix[12]);
right_plane.normalize();
Plane top_plane=Plane(matrix[ 3] - matrix[ 1],
matrix[ 7] - matrix[ 5],
matrix[11] - matrix[ 9],
- -matrix[15] + matrix[13])
+ -matrix[15] + matrix[13]);
top_plane.normalize();
Vector3 res;
@@ -229,28 +229,28 @@ bool CameraMatrix::get_endpoints(const Transform& p_transform, Vector3 *p_8point
Plane near_plane=Plane(matrix[ 3] + matrix[ 2],
matrix[ 7] + matrix[ 6],
matrix[11] + matrix[10],
- -matrix[15] - matrix[14])
+ -matrix[15] - matrix[14]);
near_plane.normalize();
///////--- Far Plane ---///////
Plane far_plane=Plane(matrix[ 2] - matrix[ 3],
matrix[ 6] - matrix[ 7],
matrix[10] - matrix[11],
- matrix[15] - matrix[14])
+ matrix[15] - matrix[14]);
far_plane.normalize();
///////--- Right Plane ---///////
Plane right_plane=Plane(matrix[ 0] - matrix[ 3],
matrix[ 4] - matrix[ 7],
matrix[8] - matrix[ 11],
- - matrix[15] + matrix[12])
+ - matrix[15] + matrix[12]);
right_plane.normalize();
///////--- Top Plane ---///////
Plane top_plane=Plane(matrix[ 1] - matrix[ 3],
matrix[ 5] - matrix[ 7],
matrix[9] - matrix[ 11],
- -matrix[15] + matrix[13])
+ -matrix[15] + matrix[13]);
top_plane.normalize();
Vector3 near_endpoint;
@@ -567,7 +567,7 @@ float CameraMatrix::get_fov() const {
Plane right_plane=Plane(matrix[ 3] - matrix[ 0],
matrix[ 7] - matrix[ 4],
matrix[11] - matrix[ 8],
- - matrix[15] + matrix[12])
+ - matrix[15] + matrix[12]);
right_plane.normalize();
return Math::rad2deg(Math::acos(Math::abs(right_plane.normal.x)))*2.0;
diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp
index 87901f6ec4..4ad3a5b8fc 100644
--- a/platform/osx/audio_driver_osx.cpp
+++ b/platform/osx/audio_driver_osx.cpp
@@ -157,8 +157,8 @@ int AudioDriverOSX::get_mix_rate() const {
return 44100;
};
-AudioDriverSW::OutputFormat AudioDriverOSX::get_output_format() const {
- return OUTPUT_STEREO;
+AudioDriver::SpeakerMode AudioDriverOSX::get_speaker_mode() const {
+ return SPEAKER_MODE_STEREO;
};
void AudioDriverOSX::lock() {
diff --git a/platform/osx/audio_driver_osx.h b/platform/osx/audio_driver_osx.h
index 19b396de57..9e9bb63726 100644
--- a/platform/osx/audio_driver_osx.h
+++ b/platform/osx/audio_driver_osx.h
@@ -31,11 +31,11 @@
#ifndef AUDIO_DRIVER_OSX_H
#define AUDIO_DRIVER_OSX_H
-#include "servers/audio/audio_server_sw.h"
+#include "servers/audio_server.h"
#include <AudioUnit/AudioUnit.h>
-class AudioDriverOSX : public AudioDriverSW {
+class AudioDriverOSX : public AudioDriver {
AudioComponentInstance audio_unit;
bool active;
@@ -61,7 +61,7 @@ public:
virtual Error init();
virtual void start();
virtual int get_mix_rate() const;
- virtual OutputFormat get_output_format() const;
+ virtual SpeakerMode get_speaker_mode() const;
virtual void lock();
virtual void unlock();
virtual void finish();
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index f6559f1f7a..d8c35472f2 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -38,10 +38,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 "servers/physics_2d/physics_2d_server_sw.h"
@@ -72,10 +69,6 @@ public:
IP_Unix *ip_unix;
AudioDriverOSX audio_driver_osx;
- AudioServerSW *audio_server;
- SampleManagerMallocSW *sample_manager;
- SpatialSoundServerSW *spatial_sound_server;
- SpatialSound2DServerSW *spatial_sound_2d_server;
InputDefault *input;
JoypadOSX *joypad_osx;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index e863104205..854ccacbf1 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1109,18 +1109,6 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
ERR_PRINT("Initializing audio failed.");
}
- sample_manager = memnew( SampleManagerMallocSW );
- audio_server = memnew( AudioServerSW(sample_manager) );
-
- audio_server->set_mixer_params(AudioMixerSW::INTERPOLATION_LINEAR,false);
- audio_server->init();
-
- spatial_sound_server = memnew( SpatialSoundServerSW );
- spatial_sound_server->init();
-
- spatial_sound_2d_server = memnew( SpatialSound2DServerSW );
- spatial_sound_2d_server->init();
-
//
physics_server = memnew( PhysicsServerSW );
physics_server->init();
@@ -1167,19 +1155,9 @@ void OS_OSX::finalize() {
CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL);
delete_main_loop();
- spatial_sound_server->finish();
- memdelete(spatial_sound_server);
- spatial_sound_2d_server->finish();
- memdelete(spatial_sound_2d_server);
-
memdelete(joypad_osx);
memdelete(input);
- memdelete(sample_manager);
-
- audio_server->finish();
- memdelete(audio_server);
-
visual_server->finish();
memdelete(visual_server);
//memdelete(rasterizer);