Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2009-08-05 14:53:25 +0400
committerJoerg Mueller <nexyon@gmail.com>2009-08-05 14:53:25 +0400
commit6cf9016dc6770ece3b50f6b52c55e5851289da66 (patch)
tree4b34f29d03ece3ef165eba5be2dfc7c43191d127
parent3389f04bc1beafc5d0f879eedb4e1b8fa6d78380 (diff)
OpenALDevice update to work with windows pthreads library.
-rw-r--r--intern/audaspace/OpenAL/AUD_OpenALDevice.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
index 33056eac923..4021df7d9c7 100644
--- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
+++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
@@ -229,7 +229,6 @@ void AUD_OpenALDevice::updateStreams()
{
unlock();
m_playing = false;
- m_thread = 0;
pthread_exit(NULL);
}
@@ -296,7 +295,6 @@ AUD_OpenALDevice::AUD_OpenALDevice(AUD_Specs specs, int buffersize)
m_specs = specs;
m_buffersize = buffersize;
m_playing = false;
- m_thread = 0;
m_playingSounds = new std::list<AUD_OpenALHandle*>(); AUD_NEW("list")
m_pausedSounds = new std::list<AUD_OpenALHandle*>(); AUD_NEW("list")
@@ -356,11 +354,15 @@ AUD_OpenALDevice::~AUD_OpenALDevice()
}
alcProcessContext(m_context);
- unlock();
// wait for the thread to stop
- if(m_thread != 0)
+ if(m_playing)
+ {
+ unlock();
pthread_join(m_thread, NULL);
+ }
+ else
+ unlock();
delete m_playingSounds; AUD_DELETE("list")
delete m_pausedSounds; AUD_DELETE("list")