diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2008-12-19 15:37:01 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2008-12-19 23:50:58 (GMT) |
commit | 53210daa96f6b7e51299a2eb15532cb296fab25d (patch) | |
tree | 23b40b55ddae9a79a5ca095131ac159f7ba3bc7f /common/Util/CSoundClient.py | |
parent | cbf35672f9aa09bbae141b6599c27d9de8b0e57c (diff) |
update lab&mic files on the fly
Diffstat (limited to 'common/Util/CSoundClient.py')
-rw-r--r-- | common/Util/CSoundClient.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 |