Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/CSoundClient.py
diff options
context:
space:
mode:
authorJames <olpc@localhost.localdomain>2007-01-29 12:03:33 (GMT)
committer James <olpc@localhost.localdomain>2007-01-29 12:03:33 (GMT)
commit9bf4b3ccc2684c108ec0228578911f4a8dc0b6b1 (patch)
tree2cafe11910c52d7ed3f4cb14282c88a2a35f1a2d /Util/CSoundClient.py
parent37d5b1c8b1248eb86db2dc8d0550569cd08b8535 (diff)
parent91597cc694d20ef5385805f26af8a1c829b1052c (diff)
merged
Diffstat (limited to 'Util/CSoundClient.py')
-rw-r--r--Util/CSoundClient.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/Util/CSoundClient.py b/Util/CSoundClient.py
index c40efb1..f70d6f2 100644
--- a/Util/CSoundClient.py
+++ b/Util/CSoundClient.py
@@ -5,7 +5,6 @@ import select
import sys
import threading
import time
-from sugar import env
import Config
@@ -23,17 +22,15 @@ class CSoundClientBase:
self.sendText( mess )
def load_mic_instrument( self, inst ):
- home_path = env.get_profile_path() + Config.PREF_DIR
- fileName = home_path + '/' + inst
+ fileName = Config.PREF_DIR + '/' + inst
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + int(fileName[-1]) + 6
mess = Config.LOAD_INSTRUMENT_COMMAND % ( instrumentId, fileName )
self.sendText( mess )
def load_instruments( self ):
- home_path = env.get_profile_path() + Config.PREF_DIR
for instrumentSoundFile in Config.INSTRUMENTS.keys():
if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab':
- fileName = home_path + '/' + instrumentSoundFile
+ fileName = Config.PREF_DIR + '/' + instrumentSoundFile
else:
fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + Config.INSTRUMENTS[ instrumentSoundFile ].instrumentId
@@ -178,8 +175,7 @@ class CSoundClientPlugin( CSoundClientBase ):
sc_inputMessage( Config.CSOUND_MIC_RECORD % table )
def load_mic_instrument( self, inst ):
- home_path = env.get_profile_path() + Config.PREF_DIR
- fileName = home_path + '/' + inst
+ fileName = Config.PREF_DIR + '/' + inst
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + int(fileName[-1]) + 6
sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName))
@@ -191,10 +187,9 @@ class CSoundClientPlugin( CSoundClientBase ):
def connect( self, init = True ):
def reconnect():
def load_instruments( ):
- home_path = env.get_profile_path() + Config.PREF_DIR
for instrumentSoundFile in Config.INSTRUMENTS.keys():
if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab':
- fileName = home_path + '/' + instrumentSoundFile
+ fileName = Config.PREF_DIR + '/' + instrumentSoundFile
else:
fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + Config.INSTRUMENTS[ instrumentSoundFile ].instrumentId