From 02c39c7eb853ff1314dcf1b9afac7b3878c9a89d Mon Sep 17 00:00:00 2001 From: flavio Date: Wed, 19 Sep 2012 17:16:22 +0000 Subject: Correction Pippy 'Playwave' --- diff --git a/library/pippy/sound.py b/library/pippy/sound.py index 08a5274..d85585f 100755 --- a/library/pippy/sound.py +++ b/library/pippy/sound.py @@ -281,7 +281,7 @@ def playWave(sound='horse', pitch=1, amplitude=1, loop=False, duration=1, if '/' in sound: fullname = sound else: - fullname = finddir() + str(sound) + fullname = os.path.join(finddir(), sound) if loop == False: lp = 0 @@ -325,17 +325,17 @@ def audioOut(file=None): global temp_path if temp_path is None: from sugar import env - temp_path = env.get_profile_path() + '/pippy' + temp_path = os.path.join(env.get_profile_path(), 'pippy') if not os.path.isdir(temp_path): os.mkdir(temp_path) path = temp_path - csd = open(path + "/temp.csd", "w") + csd = open(os.path.join(path, "temp.csd"), "w") csd.write("\n\n") csd.write("\n") if file == None: csd.write("-+rtaudio=alsa -odevaudio -m0 -d -b256 -B512\n") else: - file = path + "/" + str(file) + ".wav" + file = os.path.join(path, "%s.wav" % file) csd.write("-+rtaudio=alsa -o%s -m0 -W -d -b256 -B512\n" % file) csd.write("\n\n") csd.write("\n\n") -- cgit v0.9.1