make X autodetect working, cleanups, remove unecressary returns, shotdown of the drivers in the managers

This commit is contained in:
chrys
2016-09-17 01:04:03 +02:00
parent 52fbef639c
commit 7d7c021774
12 changed files with 93 additions and 225 deletions

View File

@ -17,6 +17,7 @@ class driver():
self.frequenceCommand = '=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence'
return environment
def shutdown(self, environment):
self.cancel()
return environment
def playFrequence(self, frequence, duration, adjustVolume):
if interrupt:
@ -34,6 +35,8 @@ class driver():
self.proc = subprocess.Popen(popenSoundFileCommand, shell=True)
self.soundType = 'file'
def cancel(self):
if self.soundType == '':
return
if self.soundType == 'file':
self.proc.kill()
if self.soundType == 'frequence':