From 1f827299ad820c1ca6f7ea6cde29cb702f89ad7e Mon Sep 17 00:00:00 2001 From: Oli Date: Fri, 23 May 2008 15:15:58 +0000 Subject: security model, cleanup, SynthLab to OGG --- (limited to 'common/Util/CSoundClient.py') diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py index 69ed50f..2ce3238 100644 --- a/common/Util/CSoundClient.py +++ b/common/Util/CSoundClient.py @@ -79,26 +79,23 @@ class _CSoundClientPlugin: sc_inputMessage( Config.CSOUND_MIC_RECORD % table ) def load_mic_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) def load_synth_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) def load_ls_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst sc_inputMessage(Config.CSOUND_LOAD_LS_INSTRUMENT % fileName) def load_instruments( self ): for instrumentSoundFile in self.instrumentDB.instNamed.keys(): if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab' or self.instrumentDB.instNamed[instrumentSoundFile].category == 'mysounds': - try: - fileName = Config.JAM_DIR + '/' + instrumentSoundFile - except: - fileName = Config.SNDS_DIR + '/' + instrumentSoundFile + fileName = Config.DATA_DIR + '/' + instrumentSoundFile else: fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ instrumentSoundFile ].instrumentId @@ -107,10 +104,7 @@ 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': - try: - fileName = Config.JAM_DIR + '/' + inst - except: - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst else: fileName = Config.SOUNDS_DIR + "/" + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ inst ].instrumentId -- cgit v0.9.1