×

Discussion Board

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

    Unhappy audio player not working in handset

    Hi,
    I wrote a simple audio player, where I select multiple "AMR" files and play one by one;
    The player works fine in emulator but not in the handset.


    synchronized (this) {

    musicIndx++;

    String curFile = playlist.getString (musicIndx);

    Player player = Manager.createPlayer("file://"+currDirName+curFile);

    player.addPlayerListener (this);

    if(player.getState() == player.UNREALIZED) {
    tmpStat ("before realize");
    player.realize ();
    tmpStat ("after realize");
    }

    if(player.getState() == player.REALIZED) {
    tmpStat ("before prefetch");
    player.prefetch ();
    tmpStat ("after prefetch");
    }

    tmpStat ("checking for existing track ... to finish");
    while (playerPlaying)
    Thread.sleep (1);
    tmpStat ("starting "+curFile);
    player.start ();
    tmpStat ("done");
    }


    The code works fine in emulator. But when I transfer to mobile, it doesnt play at all if i select more than 1 "AMR" file;
    The same application works fine for a single AMR file play.


    Is there anything to do for memory allocation related ??? pl help;

  2. #2
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: audio player not working in handset

    did you log any particuliar error? are you running this in a separated thread? where in your code does it stop?

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

    Talking Re: audio player not working in handset

    Quote Originally Posted by njzk2 View Post
    did you log any particuliar error? are you running this in a separated thread? where in your code does it stop?
    The issue is resolved;
    I .close () the player at EndOfMedia, and then create the next track. It works fine now.
    But I have problem to play MP3 files using the same code.

    As of now, working further on this app with AMR files only.

Similar Threads

  1. Replies: 8
    Last Post: 2009-06-17, 07:16
  2. Audio recording from a audio player
    By kevin8093 in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2008-03-27, 09:33
  3. Nokia music player series 40 handset 6300
    By caldran in forum Series 40 & S60 Platform Feedback Archive
    Replies: 1
    Last Post: 2008-02-21, 19:37
  4. not working on target handset
    By krgvs in forum Symbian
    Replies: 2
    Last Post: 2008-01-02, 06:48
  5. Sending audio file to handset
    By cmeghna in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2006-09-25, 20:41

Posting Permissions

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