diff --git a/src/fenrir-package/soundDriver/sox.py b/src/fenrir-package/soundDriver/sox.py index 12cbfca9..746c9ba1 100644 --- a/src/fenrir-package/soundDriver/sox.py +++ b/src/fenrir-package/soundDriver/sox.py @@ -6,6 +6,7 @@ class driver(): self.proc = None self.volume = 1.0 self.soundType = '' + self.soundFileCommand = 'play -q -v fenrirVolume fenrirSoundFile' def initialize(self, environment): return environment def shutdown(self, environment): @@ -15,7 +16,9 @@ class driver(): def playSoundFile(self, filePath, interrupt = True): if interrupt: self.cancel() - self.proc = subprocess.Popen("play -q -v " + str(self.volume ) + ' ' + filePath, shell=True) + popenSoundFileCommand = self.soundFileCommand.replace('fenrirVolume', str(self.volume )) + popenSoundFileCommand = popenSoundFileCommand.replace('fenrirSoundFile', filePath) + self.proc = subprocess.Popen(popenSoundFileCommand filePath, shell=True) self.soundType = 'file' def cancel(self): if self.soundType == 'file':