From e13824f64f6211e1832218f3bcbc1e83f536083e Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 30 Jan 2017 16:22:12 +0100 Subject: [PATCH] Update dummyDriver.py --- src/fenrir/soundDriver/dummyDriver.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/fenrir/soundDriver/dummyDriver.py b/src/fenrir/soundDriver/dummyDriver.py index 499730d2..ed9be4c7 100644 --- a/src/fenrir/soundDriver/dummyDriver.py +++ b/src/fenrir/soundDriver/dummyDriver.py @@ -10,29 +10,46 @@ class driver(): def __init__(self): self.volume = None self._initialized = False + def initialize(self, environment): self.env = environment + self._initialized = True + pirnt('SoundDummyDriver: Initialize') + def shutdown(self): if not self._initialized: return self.cancel() + pirnt('SoundDummyDriver: Shutdown') + def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0): if not self._initialized: return if interrupt: self.cancel() + pirnt('SoundDummyDriver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) ) + pirnt('SoundDummyDriver: -----------------------------------')') + def playSoundFile(self, filePath, interrupt = True): if not self._initialized: return if interrupt: self.cancel() + pirnt('SoundDummyDriver: playSoundFile:' + str(filePath)) + pirnt('SoundDummyDriver: -----------------------------------') + def cancel(self): if not self._initialized: return + pirnt('SoundDummyDriver: Cancel') + def setCallback(self, callback): if not self._initialized: return + pirnt('SoundDummyDriver: setCallback') + def setVolume(self, volume): if not self._initialized: return - self.volume = volume + self.volume = volume + pirnt('SoundDummyDriver: setVolume:' + str(self.volume))