diff options
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 |