Author: remi
Date: 2009-04-17 23:21:18 +0200 (Fri, 17 Apr 2009)
New Revision: 4550
Modified:
softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/TuxOSL.py
softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/libtuxosl.dll
Log:
* fixed "crazy speed" bug on Windows (and surely others crashes). Sometimes the
TTS audio device was opened 3 times ! ho my fucking god ...
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/TuxOSL.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/TuxOSL.py
2009-04-17 15:37:44 UTC (rev 4549)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/TuxOSL.py
2009-04-17 21:21:18 UTC (rev 4550)
@@ -174,6 +174,7 @@
self.__logger.logError(txt)
self.__started = False
self.__startedMutex = threading.Lock()
+ self.__startingMutex = threading.Lock()
#
--------------------------------------------------------------------------
# Register a callback function to the "status" event.
@@ -219,7 +220,13 @@
@param tts_engine_path: TTS engine path (Not yet used)
@return: The success of the starting.
"""
+ self.__startingMutex.acquire()
+ if self.getStarted():
+ self.__startingMutex.release()
+ return E_TUXOSL_NOERROR
+
if self.tux_osl_lib == None:
+ self.__startingMutex.release()
return E_TUXOSL_NOTRUNNING
try:
@@ -236,7 +243,7 @@
self.__setStarted(False)
self.__logger.logError("Libtuxosl can't start : code(%d)
expl(%s)."\
% (ret, self.StrError(ret)))
-
+ self.__startingMutex.release()
return ret
#
--------------------------------------------------------------------------
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/osl/libtuxosl.dll
===================================================================
(Binary files differ)
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn