×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    22

    Cannot play more than 3 audio files?

    After extensive searching on the net, I still could not find the answer to my problem. It may be very trivial to you guys, but help would be much appreciated!

    I have the following code that works for 3 files/3 functions, but not with 4 files/4 functions. Why?

    Code:
    import appuifw
    import e32
    import appuifw
    import audio
    
    S1 = audio.Sound.open("E:\\Python\\chimes.wav")
    S2 = audio.Sound.open("E:\\Python\\DingLing.wav")
    S3 = audio.Sound.open("E:\\Python\\Bleep.wav")
    S4 = audio.Sound.open("E:\\Python\\Ding.wav")
    
    def playS1():
        global S1
        S1.play(1,0)
    
    def playS2():
        global S2
        S2.play(1,0)
    
    def playS3():
        global S3
        S3.play(1,0)
    
    def playS4():
        global S4
        S4.play(1,0)
        
    def quit():
        app_lock.signal()
    
    app_lock = e32.Ao_lock()    
    
    # Create a simple menu
    appuifw.app.menu = [(u"S1", playS1),
                        (u"S2", playS2),
                        (u"S3", playS3),
                        (u"S4", playS4)]
        
        
    appuifw.app.exit_key_handler=quit
    app_lock.wait()
    Last edited by hyon; 2008-02-18 at 02:17.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Cannot play more than 3 audio files?

    I've tried the code exactly as written by you and it works. It plays all 4 sounds.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    22

    Re: Cannot play more than 3 audio files?

    Did you try with four different wav files?

    I have a feeling it may be a hardware problem. I'm using a 5500.
    Last edited by hyon; 2008-02-18 at 02:16.

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Cannot play more than 3 audio files?

    Yes, you're right. The fourth file is the second one. Don't know why.
    But interestingly, it plays 4 files if you have 5 (the situation is the same, the fourth one is actually the second one, but the fifth one is different). Strange.

Similar Threads

  1. How to read the stored audio files from memory card?
    By katy2 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-03-29, 08:01
  2. play audio files
    By khalandar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-07, 05:58
  3. Saving audio files from RMS to phone storage
    By a_nemoff in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2006-05-17, 19:04
  4. Playing more audio files ? ......
    By senthilkumar05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2006-03-03, 11:04
  5. problem about audio files in UI40
    By prawwaree in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-04-18, 04:22

Posting Permissions

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