From ebe5a869f2a3304d7ab3148bd39a8bfd023ff84c Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 18 Dec 2008 08:49:43 +0000 Subject: use env variables to setup debug flags --- (limited to 'common/Util/CSoundClient.py') diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py index 2ce3238..1fee0cb 100644 --- a/common/Util/CSoundClient.py +++ b/common/Util/CSoundClient.py @@ -104,9 +104,12 @@ class _CSoundClientPlugin: def load_instrument(self, inst): if not inst in loadedInstruments: if inst[0:3] == 'mic' or inst[0:3] == 'lab' or self.instrumentDB.instNamed[inst].category == 'mysounds': - fileName = Config.DATA_DIR + '/' + inst + if os.path.isfile(os.path.join(Config.DATA_DIR, inst)): + fileName = os.path.join(Config.DATA_DIR, inst) + else: + fileName = os.path.join(Config.SOUNDS_DIR, 'armbone') else: - fileName = Config.SOUNDS_DIR + "/" + inst + fileName = os.path.join(Config.SOUNDS_DIR, inst) instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ inst ].instrumentId sc_inputMessage( Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName) ) loadedInstruments.append(inst) -- cgit v0.9.1