×

Discussion Board

Results 1 to 3 of 3

Thread: code exemple

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    19

    Exclamation code exemple

    hello,
    I need code example of Player class using in nokia 6101.
    I use soundes in my application. I use "midi" format.
    The mobile playes the first sound always but the followed soundes played in some application runs and in so me of the runs not.

    For now i use the following code:

    String[] soundsFileName = {"1.mid", "2.mid", "3.mid", "4.mid"};
    Sound s[] = new Player[soundsFileName.length];

    for(int i=0; i<soundsFileName.length; i++)
    s[i]=Manager.createPlayer(soundsFileName[i],"audio/midi");

    try{
    s[tune].prefetch();
    s[tune].start();
    }catch(Exception e){}

    10x in advance

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: code exemple

    That phone does not support multiple simulatenous players. You have to close the previous player before trying to start to play the next one.

    Hartti

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    19

    Exclamation Re: code exemple

    Is it enough to use stop() fun or must I use close() fun ?
    I use stop() but after playing the third sound the app throws MediaException (sometimes on the second sound and the third sound is played. The fourth sound never played).

Similar Threads

  1. Replies: 2
    Last Post: 2007-10-05, 20:40
  2. newbie : code 404 when trying to connect to localhost/test.txt
    By lynx3521 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-09-25, 16:21
  3. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46
  4. Replies: 0
    Last Post: 2003-09-26, 15:07

Posting Permissions

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