add debug
This commit is contained in:
parent
f261583a4b
commit
a47c2529b0
@ -14,22 +14,22 @@ class driver(soundDriver):
|
|||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
self.env = environment
|
self.env = environment
|
||||||
self._initialized = True
|
self._initialized = True
|
||||||
print('Sound Debug Driver: Initialized')
|
print('Sound Debug Driver: Initialized')
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if not self._initialized:
|
if not self._initialized:
|
||||||
return
|
return
|
||||||
self.cancel()
|
self.cancel()
|
||||||
self._initialized = False
|
self._initialized = False
|
||||||
print('Sound Debug Driver: Shutdown')
|
print('Sound Debug Driver: Shutdown')
|
||||||
|
|
||||||
def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0):
|
def playFrequence(self, frequence, duration, adjustVolume = 0, interrupt=True):
|
||||||
if not self._initialized:
|
if not self._initialized:
|
||||||
return
|
return
|
||||||
if interrupt:
|
if interrupt:
|
||||||
self.cancel()
|
self.cancel()
|
||||||
print('Sound Debug Driver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) )
|
print('Sound Debug Driver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) )
|
||||||
print('Sound Debug Driver: -----------------------------------')
|
print('Sound Debug Driver: -----------------------------------')
|
||||||
|
|
||||||
def playSoundFile(self, filePath, interrupt = True):
|
def playSoundFile(self, filePath, interrupt = True):
|
||||||
if not self._initialized:
|
if not self._initialized:
|
||||||
@ -37,7 +37,7 @@ class driver(soundDriver):
|
|||||||
if interrupt:
|
if interrupt:
|
||||||
self.cancel()
|
self.cancel()
|
||||||
print('Sound Debug Driver: playSoundFile:' + str(filePath))
|
print('Sound Debug Driver: playSoundFile:' + str(filePath))
|
||||||
print('Sound Debug Driver: -----------------------------------')
|
print('Sound Debug Driver: -----------------------------------')
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
if not self._initialized:
|
if not self._initialized:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user