Fix Typo, add optional parameters
This commit is contained in:
parent
f6eb8a7b67
commit
251e4eda3e
@ -21,12 +21,12 @@ class driver():
|
|||||||
if self.soundFileCommand == '':
|
if self.soundFileCommand == '':
|
||||||
self.soundFileCommand = 'play -q -v fenrirVolume fenrirSoundFile'
|
self.soundFileCommand = 'play -q -v fenrirVolume fenrirSoundFile'
|
||||||
if self.frequenceCommand == '':
|
if self.frequenceCommand == '':
|
||||||
self.frequenceCommand = '=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence'
|
self.frequenceCommand = 'play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence'
|
||||||
return
|
return
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.cancel()
|
self.cancel()
|
||||||
return
|
return
|
||||||
def playFrequence(self, frequence, duration, adjustVolume):
|
def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0):
|
||||||
if interrupt:
|
if interrupt:
|
||||||
self.cancel()
|
self.cancel()
|
||||||
popenFrequenceCommand = self.frequenceCommand.replace('fenrirVolume', str(self.volume + adjustVolume ))
|
popenFrequenceCommand = self.frequenceCommand.replace('fenrirVolume', str(self.volume + adjustVolume ))
|
||||||
|
Loading…
Reference in New Issue
Block a user