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:
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)