×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    39

    Unhappy Play MP3 not playing fully

    Hello, I wrote a MP3 player ... that starts the play but repeats the same note continuously, without moving forward.

    Meaning, it starts fine but again & again playing the started tone like, 123333333333

    Any ideas ? pl help .. Here's the code snippet:


    InputStream is = mainScr.getIS (currDirName+curFile);
    String ctype = "audio/mpeg";
    player = Manager.createPlayer(is, ctype);

    VolumeControl vc = (VolumeControl) player.getControl("VolumeControl");
    if(vc != null)
    {
    vc.setLevel(100);
    }
    player.setLoopCount (-1);
    player.realize ();
    player.prefetch();
    player.addPlayerListener (this);
    player.start ();

  2. #2
    Registered User
    Join Date
    Dec 2010
    Posts
    39

    Re: Play MP3 not playing fully

    Seems some problem with player.realize; Its not ending at all ... and hence the next display never comes.
    The code goes as follows:

    MyForm.append ("before realize"); display.set....
    player.realize ();
    MyForm.append ("after realize"); display.set ... - this line never comes

    any clues ???

    note: My previous question is resolved after I use createPlayer ("<mp3>") format;

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Play MP3 not playing fully

    You must do the player realized() before you come and do any operation or call any of the life cycle of the player. So I think that before you set the volume please call the realized() and let us know the results.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Play MP3 not playing fully

    On what device? Is realize() throwing an exception (or, for example, an OutOfMemoryError)?

    Graham.

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    39

    Re: Play MP3 not playing fully

    I removed the volume control related stuff. My player creates, realize, prefetch & start in sequence, with displays before & after each operation. The code works fine in my handset for AMR files but not for MP3s .
    The same code works fine in my colleague's handset for MP3s also.

    I guess the problem with my device may be; but I dont know how to fix it.

  6. #6
    Registered User
    Join Date
    Dec 2010
    Posts
    39

    Re: Play MP3 not playing fully

    realize not throwing any exception; I can say so coz I catch exceptions (including "Exception" which is a super class) and have given displays.

    I've put displays before & after realize. The display "before realize" works fine. The display "after realize" is not at all coming.

    By the by, my device is "Samsung Corby GT-B3210".

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Play MP3 not playing fully

    Try "catch (Throwable t)" rather than "catch (Exception e)". Catching Exception will not catch everything.

    You might want also to try the Samsung Mobile developer website.

    Graham.

  8. #8
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Play MP3 not playing fully

    And which is the device your friend is using, on which the code works fine?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  9. #9
    Registered User
    Join Date
    Dec 2010
    Posts
    39

    Re: Play MP3 not playing fully

    Quote Originally Posted by raj_J2ME View Post
    And which is the device your friend is using, on which the code works fine?
    Both having Samsung mobile, but model different;

  10. #10
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Play MP3 not playing fully

    that won't help much
    when a technician or a developer asks for information you might want to try to give this information as specific as possible... "A Samsung device" isn't very specific...
    It's like going to the doctor and telling him you are experiencing pain and when he asks you where you just answer that you are experiencing pain... should he help you for a migraine, a broken bone, or a punctured lung ?
    A model would be better, if there are different hardware revision's the specific version would be nice also, also the firmware version would be handy etc etc...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. How to play sound when battery fully charged
    By kalki in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2010-01-02, 13:04
  2. mp3 is not playing in Symbian 8.0
    By soni_neeraj in forum Symbian
    Replies: 8
    Last Post: 2009-04-28, 09:57
  3. playing mp3
    By mahesh_aquarius in forum Mobile Java General
    Replies: 3
    Last Post: 2008-10-17, 06:33
  4. how to play mp3 file and play long wav file
    By changsshuai in forum Symbian
    Replies: 6
    Last Post: 2008-09-02, 09:50
  5. playing mp3
    By cosmio in forum General Development Questions
    Replies: 0
    Last Post: 2004-11-27, 06:58

Posting Permissions

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