Author: remi
Date: 2009-06-12 10:15:15 +0200 (Fri, 12 Jun 2009)
New Revision: 4799
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/system/Device.py
Log:
* added support of Windows Vista in the dsound Tux Droid audio device string
Modified: software_suite_v3/smart-core/smart-server/trunk/util/system/Device.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/system/Device.py
2009-06-12 07:42:45 UTC (rev 4798)
+++ software_suite_v3/smart-core/smart-server/trunk/util/system/Device.py
2009-06-12 08:15:15 UTC (rev 4799)
@@ -20,6 +20,11 @@
@return: A string.
"""
if os.name == 'nt':
+ import platform
+ if int(platform.version().split(".")[0]) >= 6:
+ deviceName = "Speakers (TuxDroid-Audio)"
+ else:
+ deviceName = "TuxDroid-Audio"
from ctypes import windll
winmm = windll.winmm
wvcps = ' ' * 52
@@ -27,7 +32,7 @@
for i in range(cardsCount):
try:
if winmm.waveOutGetDevCapsA(i, wvcps,len(wvcps)) == 0:
- if wvcps[8:].split("\0")[0].find("TuxDroid-Audio") ==
0:
+ if wvcps[8:].split("\0")[0].find(deviceName) == 0:
idx = i + 1
return "dsound:device=%d" % idx
except:
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn