From 53210daa96f6b7e51299a2eb15532cb296fab25d Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Fri, 19 Dec 2008 15:37:01 +0000 Subject: update lab&mic files on the fly --- (limited to 'common/Util/CSoundClient.py') diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py index 1fee0cb..44f61c5 100644 --- a/common/Util/CSoundClient.py +++ b/common/Util/CSoundClient.py @@ -319,6 +319,17 @@ class _CSoundClientPlugin: rval=storage instrument = self.instrumentDB.instId[instrumentId] + + if instrument.volatile != None: + sound = os.path.join(Config.DATA_DIR, instrument.name) + if os.path.isfile(sound): + st_mtime = os.stat(sound).st_mtime + if st_mtime != instrument.volatile: + instrument.volatile = st_mtime + loadedInstruments.remove(instrument.name) + self.load_instrument(instrument.name) + time.sleep(0.2) + if instrument.kit != None: instrument = self.instrumentDB.instNamed[instrument.kit[pitch]] pitch = 1 -- cgit v0.9.1