Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2012-09-19 17:16:22 (GMT)
committer flavio <fdanesse@gmail.com>2012-09-19 17:16:22 (GMT)
commit02c39c7eb853ff1314dcf1b9afac7b3878c9a89d (patch)
treef79b7f057bcedb956e0a98d646e807e51694ef80
parent71c79c519e8526ad3cb25d9c98e4bb59a9fd8cda (diff)
Correction Pippy 'Playwave'
-rwxr-xr-xlibrary/pippy/sound.py8
1 files changed, 4 insertions, 4 deletions
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("<CsoundSynthesizer>\n\n")
csd.write("<CsOptions>\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("</CsOptions>\n\n")
csd.write("<CsInstruments>\n\n")