Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util/CSoundClient.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2008-12-18 08:49:43 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2008-12-19 23:50:57 (GMT)
commitebe5a869f2a3304d7ab3148bd39a8bfd023ff84c (patch)
tree7a3cfbe023c68f7f5768b032d60cbac442ecad63 /common/Util/CSoundClient.py
parentd6ba40c9b568a99d1fb8e459cb9497cfffd3e981 (diff)
use env variables to setup debug flags
Diffstat (limited to 'common/Util/CSoundClient.py')
-rw-r--r--common/Util/CSoundClient.py7
1 files changed, 5 insertions, 2 deletions
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)