Fix Typo, add optional parameters

This commit is contained in:
chrys87 2016-10-24 17:46:18 +02:00 committed by GitHub
parent f6eb8a7b67
commit 251e4eda3e

View File

@ -21,12 +21,12 @@ class driver():
if self.soundFileCommand == '':
self.soundFileCommand = 'play -q -v fenrirVolume fenrirSoundFile'
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
def shutdown(self):
self.cancel()
return
def playFrequence(self, frequence, duration, adjustVolume):
def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0):
if interrupt:
self.cancel()
popenFrequenceCommand = self.frequenceCommand.replace('fenrirVolume', str(self.volume + adjustVolume ))