Hi
i installed S60_5th_Edition_SDK_v1_0_.en.zip,Python_2_0.0.3rdEdFP2.zip and python-2.5.4. Basic python programs are working. I am interested to run audio files using emulator. I am trying this code:
importinbox,
audiobox = inbox.Inbox()
msg_id= box.sms_messages()[0]
msg_txt= u"Message: "+ box.content(msg_id)
audio.say(msg_txt)
after running this code my simulator is hanging and it is not playing any sound.
when i am trying this code:
import appuifw, audio, os
MENU = [u"Play sound", u"Record sound", u"Delete sound"]
SOUNDFILE = u"C:\\test1.mp3"
sound = None
while True:
index = appuifw.popup_menu(MENU, u"Select operation")
if sound:
sound.stop()
sound = audio.Sound.open(SOUNDFILE)
if index == 0:
sound.play()
elif index == 1:
sound.record()
appuifw.query(u"Press OK to stop recording", "query")
sound.stop()
elif index == 2:
os.remove(SOUNDFILE)
else:
break
It is giving me exception
File "c:\data\python\audio3.py",line 9, in <module>
sound=audio.Sound.open(SOUNDFILE)
File"C:\resource\python25\python25.zip\audio.py", line 45, in open
Error opening file: "+e32.strerror(callback_error[0]))
SymbianError:[Errno -1] Error opening file: KErrNotFound
Is is feasible to run audio file in emulator. Is yes, plz suggest possible method/correction.
adarsh

Reply With Quote

