From d85b67be53bac252c0a28b799d56d1b359c4ee99 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 2 Nov 2014 11:31:01 -0300 Subject: Bug Fixes -=-=-=-=- -Fixed problem with scaling shapes (#827), related to not taking scale in consideration for calculating the moment of inertia -Added support for multiline strings (or comments) using """ -Save subscene bug, properties not being saved in root node (#806) -Fix Crash in CollisionPolygon2DEditor (#814) -Restored Ability to compile without 3D (#795) -Fix InterpolatedCamera (#803) -Fix UV Import for OBJ Meshes (#771) -Fixed issue with modifier gizmos (#794) -Fixed CapsuleShape gizmo handle (#50) -Fixed Import Button (not properly working in 3D) (#733) -Many misc fixes (though no new features) --- platform/osx/audio_driver_osx.cpp | 37 ++++++++++++++++++++++++++++++++----- platform/osx/audio_driver_osx.h | 4 ++++ platform/windows/detect.py | 10 ++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) (limited to 'platform') diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp index 8f28e8ff63..638ac7e504 100644 --- a/platform/osx/audio_driver_osx.cpp +++ b/platform/osx/audio_driver_osx.cpp @@ -101,7 +101,16 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, AudioBuffer *abuf; AudioDriverOSX* ad = (AudioDriverOSX*)inRefCon; - if (!ad->active) { + bool mix = true; + + if (!ad->active) + mix = false; + else if (ad->mutex) { + mix = ad->mutex->try_lock() == OK; + }; + + + if (!mix) { for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) { abuf = &ioData->mBuffers[i]; zeromem(abuf->mData, abuf->mDataByteSize); @@ -120,9 +129,9 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, while (frames_left) { int frames = MIN(frames_left, ad->buffer_frames); - ad->lock(); + //ad->lock(); ad->audio_server_process(frames, ad->samples_in); - ad->unlock(); + //ad->unlock(); for(int i = 0; i < frames * ad->channels; i++) { @@ -134,6 +143,9 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, }; }; + if (ad->mutex) + ad->mutex->unlock(); + return 0; }; @@ -149,12 +161,27 @@ AudioDriverSW::OutputFormat AudioDriverOSX::get_output_format() const { return OUTPUT_STEREO; }; -void AudioDriverOSX::lock() {}; -void AudioDriverOSX::unlock() {}; +void AudioDriverOSX::lock() { + if (active && mutex) + mutex->lock(); +}; +void AudioDriverOSX::unlock() { + if (active && mutex) + mutex->unlock(); +}; void AudioDriverOSX::finish() { memdelete_arr(samples_in); }; +AudioDriverOSX::AudioDriverOSX() { + + mutex=Mutex::create();//NULL; +}; + +AudioDriverOSX::~AudioDriverOSX() { + +}; + #endif diff --git a/platform/osx/audio_driver_osx.h b/platform/osx/audio_driver_osx.h index daa388fb86..c0336eb816 100644 --- a/platform/osx/audio_driver_osx.h +++ b/platform/osx/audio_driver_osx.h @@ -39,6 +39,7 @@ class AudioDriverOSX : public AudioDriverSW { AudioComponentInstance audio_unit; bool active; + Mutex *mutex; int channels; int32_t* samples_in; @@ -64,6 +65,9 @@ public: virtual void lock(); virtual void unlock(); virtual void finish(); + + AudioDriverOSX(); + ~AudioDriverOSX(); }; #endif diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 16f70b60d0..be92ee8f6d 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -209,6 +209,16 @@ def configure(env): env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED']) env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLEW_ENABLED']) env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','wsock32','kernel32']) + + if (env["bits"]=="32" and env["mingw64_for_32"]!="yes"): +# env.Append(LIBS=['gcc_s']) + #--with-arch=i686 + env.Append(CPPFLAGS=['-march=i686']) + env.Append(LINKFLAGS=['-march=i686']) + + + + #'d3dx9d' env.Append(CPPFLAGS=['-DMINGW_ENABLED']) env.Append(LINKFLAGS=['-g']) -- cgit v1.2.3