[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22224] branches/soundsystem/intern/ audaspace/OpenAL/AUD_OpenALDevice.cpp: OpenALDevice update to work with windows pthreads library.

Jörg Müller nexyon at gmail.com
Wed Aug 5 12:53:25 CEST 2009


Revision: 22224
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22224
Author:   nexyon
Date:     2009-08-05 12:53:25 +0200 (Wed, 05 Aug 2009)

Log Message:
-----------
OpenALDevice update to work with windows pthreads library.

Modified Paths:
--------------
    branches/soundsystem/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp

Modified: branches/soundsystem/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
===================================================================
--- branches/soundsystem/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2009-08-05 09:49:59 UTC (rev 22223)
+++ branches/soundsystem/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2009-08-05 10:53:25 UTC (rev 22224)
@@ -229,7 +229,6 @@
 		{
 			unlock();
 			m_playing = false;
-			m_thread = 0;
 			pthread_exit(NULL);
 		}
 
@@ -296,7 +295,6 @@
 	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 @@
 	}
 
 	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")





More information about the Bf-blender-cvs mailing list