summaryrefslogtreecommitdiff
path: root/servers/audio
diff options
context:
space:
mode:
authorAriel Manzur <ariel@godotengine.org>2015-12-21 09:01:40 -0300
committerAriel Manzur <ariel@godotengine.org>2015-12-21 09:01:40 -0300
commit72a6b137ba256f5198843f8980107c350d52e5ca (patch)
treebbfffd83f4aef5006c314c97e49fc217d935fef4 /servers/audio
parent19267f30d91fe3554435cae66cc80eddeb93b119 (diff)
audio threads
Diffstat (limited to 'servers/audio')
-rw-r--r--servers/audio/audio_server_sw.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp
index d20e2d42e0..8ab220d189 100644
--- a/servers/audio/audio_server_sw.cpp
+++ b/servers/audio/audio_server_sw.cpp
@@ -30,6 +30,10 @@
#include "globals.h"
#include "os/os.h"
+#ifdef NO_THREADS
+#define NO_AUDIO_THREADS
+#endif
+
struct _AudioDriverLock {
_AudioDriverLock() { if (AudioDriverSW::get_singleton()) AudioDriverSW::get_singleton()->lock(); }
@@ -803,7 +807,7 @@ void AudioServerSW::init() {
if (AudioDriverSW::get_singleton())
AudioDriverSW::get_singleton()->start();
-#ifndef NO_THREADS
+#ifndef NO_AUDIO_THREADS
exit_update_thread=false;
thread = Thread::create(_thread_func,this);
thread->set_name("AudioServerSW");
@@ -813,7 +817,7 @@ void AudioServerSW::init() {
void AudioServerSW::finish() {
-#ifndef NO_THREADS
+#ifndef NO_AUDIO_THREADS
exit_update_thread=true;
Thread::wait_to_finish(thread);
memdelete(thread);
@@ -846,7 +850,7 @@ void AudioServerSW::_update_streams(bool p_thread) {
void AudioServerSW::update() {
_update_streams(false);
-#ifdef NO_THREADS
+#ifdef NO_AUDIO_THREADS
_update_streams(true);
#endif