×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    How to play audio file in S60 5th Edition SDK v1.0 emulator

    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

  2. #2
    Registered User
    Join Date
    Oct 2009
    Posts
    7

    Re: How to play audio file in S60 5th Edition SDK v1.0 emulator

    import appuifw, audio, os

    MENU = [u"Play sound", u"Record sound", u"Delete sound"]

    SOUNDFILE = u"C:\\test.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
    ==================================================
    Tested it on NOKIA MINI N97 Device
    Play sound - Works Fine
    Record sound -[Errno-5] KErrNotSupported -May be device does not support voice recording.
    Delete sound - Permission denied as it is present in c:

    if it is not working on the Emulator , Would suggest to see if you have higher RAM and Processor on the PC because Emulator takes up more RAM and because of which response becomes sluggish.

Similar Threads

  1. Replies: 1
    Last Post: 2010-02-08, 13:21
  2. S60 5th Edition SDK Emulator SLOW -- Will PC Upgrade to fix
    By earamsey in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2010-01-21, 22:56
  3. S60 5th Edition SDK Emulator -- SLOW
    By earamsey in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2010-01-18, 19:48
  4. Eclipse + S60 SDK 5th v1.0 + J2ME eclipse plugin: Emulator problem
    By ares.f in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2009-05-29, 10:04
  5. S60 5th Edition SDK and Bluetooth Stack Emulator
    By Wicked1983 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2009-05-14, 11:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •