[tuxdroid-svn] r320 - api/python/trunk
Status: Beta
Brought to you by:
ks156
From: madjar <c2m...@c2...> - 2007-05-13 15:32:53
|
Author: madjar Date: 2007-05-13 17:31:44 +0200 (Sun, 13 May 2007) New Revision: 320 Modified: api/python/trunk/tuxapi_class.py Log: ADD: new fonction tux.hw.oss_device() return the path to the oss tux device (ex:/dev/dsp1) #31 Modified: api/python/trunk/tuxapi_class.py =================================================================== --- api/python/trunk/tuxapi_class.py 2007-05-12 18:00:13 UTC (rev 319) +++ api/python/trunk/tuxapi_class.py 2007-05-13 15:31:44 UTC (rev 320) @@ -3574,6 +3574,22 @@ else: self.alsa_device="default" + #-------------------------------------------------------------------------- + # Get the oss compatibility device of the tux sound card + #-------------------------------------------------------------------------- + def oss_device(self): + """ + Get the oss compatibility device of the tux sound card + + Return a string (ex : '/dev/dsp') + """ + if self.alsa_device=='default': + return '' + elif self.alsa_device[3]=='0': + return '/dev/dsp' + else: + return '/dev/dsp%s'%self.alsa_device[3] + #============================================================================== # TUXTCPCommunicator - TTS - class #============================================================================== |