diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2008-12-19 01:30:32 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2008-12-19 23:50:57 (GMT) |
commit | fbee8354739ecb45aa70345a7ee3a7b0584e6766 (patch) | |
tree | 309c019f24ba78fe3bd7e6e901aaaac05b041b81 /TamTamSynthLab.activity | |
parent | df75dd3b08c5ae87cc0c9d43870a5a73467eeb0f (diff) |
use OS.system instead of commands.getstatusoutput
Diffstat (limited to 'TamTamSynthLab.activity')
-rw-r--r-- | TamTamSynthLab.activity/SynthLab/SynthLabMain.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/TamTamSynthLab.activity/SynthLab/SynthLabMain.py b/TamTamSynthLab.activity/SynthLab/SynthLabMain.py index 24e6077..87ed022 100644 --- a/TamTamSynthLab.activity/SynthLab/SynthLabMain.py +++ b/TamTamSynthLab.activity/SynthLab/SynthLabMain.py @@ -26,6 +26,7 @@ from SynthLab.SynthLabToolbars import presetToolbar from common.Util.Trackpad import Trackpad from sugar.datastore import datastore from sugar.graphics import style +from common.Util import OS as_window = False @@ -526,8 +527,8 @@ class SynthLabMain(gtk.EventBox): time.sleep(0.5) command = "gst-launch-0.10 filesrc location=" + Config.TMP_DIR + "/lab0 ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=" + self.audioFileName command2 = "rm " + Config.TMP_DIR + "/lab0" - (status, output) = commands.getstatusoutput(command) - (status2, output2) = commands.getstatusoutput(command2) + OS.system(command) + OS.system(command2) jobject = datastore.create() jobject.metadata['title'] = os.path.split(self.audioFileName)[1] @@ -688,10 +689,10 @@ class SynthLabMain(gtk.EventBox): dur = self.synthObjectsParameters.sourcesParameters[(i % 4) * 4] if os.path.isfile(Config.DATA_DIR + '/labmic' + str(snd)): os.system('rm ' + Config.DATA_DIR + '/labmic' + str(snd)) - (s1,o1) = commands.getstatusoutput("arecord -f S16_LE -t wav -r 16000 -d " + str(dur) + " " + Config.DATA_DIR + '/tempMic.wav') - (s2, o2) = commands.getstatusoutput("csound " + "--strset999=" + Config.DATA_DIR + " " + Config.FILES_DIR + "/cropSynthLab.csd") - (s3, o3) = commands.getstatusoutput("mv " + Config.DATA_DIR + "/micTemp.wav " + Config.DATA_DIR + "/" + 'labmic' + str(snd)) - (s4, o4) = commands.getstatusoutput("rm " + Config.DATA_DIR + "/tempMic.wav") + OS.system("arecord -f S16_LE -t wav -r 16000 -d " + str(dur) + " " + Config.DATA_DIR + '/tempMic.wav') + OS.system("csound " + "--strset999=" + Config.DATA_DIR + " " + Config.FILES_DIR + "/cropSynthLab.csd") + OS.system("mv " + Config.DATA_DIR + "/micTemp.wav " + Config.DATA_DIR + "/" + 'labmic' + str(snd)) + OS.system("rm " + Config.DATA_DIR + "/tempMic.wav") return def handleMotion( self, widget, event ): |