Author: remi
Date: 2008-12-18 03:41:32 +0100 (Thu, 18 Dec 2008)
New Revision: 3163

Modified:
   software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpserver.py
Log:
* if no audio device found in tuxosl, the server is restarted. Windows only. 
(Prevent Portaudio crash with our dongle)

Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpserver.py
===================================================================
--- software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpserver.py  
2008-12-18 02:39:59 UTC (rev 3162)
+++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpserver.py  
2008-12-18 02:41:32 UTC (rev 3163)
@@ -254,7 +254,7 @@
         """Callback function when the dongle is connected
         """
         global Glb_DonglePresent
-        
+
         def startTuxOsl():
             # Start the osl library
             Glb_ServerLog.logInfo("Start Tuxosl")
@@ -263,11 +263,16 @@
                 err = self.__tuxOSL.Start("Acapela")
                 if err == E_TUXOSL_NOERROR:
                     break
+                elif err == E_TUXOSL_NODEVICE:
+                    if os.name == "nt":
+                        serverStart = '"%s"' % os.path.join(TUXDROID_BASE_PATH,
+                            "bin", "tuxhttpserver_start.exe")
+                        os.system(serverStart)
             Glb_ServerLog.logInfo("Tuxosl started")
-        
+
         t = threading.Thread(target = startTuxOsl)
         t.start()
-        
+
         Glb_DonglePresent = True
 
     def __onDongleDisconnected(self):


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to