Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User A.Saleh's Avatar
    Join Date
    Apr 2010
    Posts
    4
    i m developing an application using S60 3rd edition FP1 SDK, which can play multiple audio files.i tried this code but problem is it takes delay after playing one file i.e to start the next one. can anyone tell me how to play these files (one after another) using MMAPI. plzzz..its urgent

    public class AudioPlayer implements javax.microedition.media.PlayerListener{

    Player player;
    int count=0;

    public void playMedia(){

    try{

    player = Manager.createPlayer(getClass().getResourceAsStream(audioFiles[count]),"audio/x-amr");
    player.addPlayerListener(this);
    player.start();

    }
    catch (Exception e) {
    return ;
    }
    }


    public void playerUpdate(Player p,String event,Object eventData) {

    if (event==PlayerListener.END_OF_MEDIA)
    {
    try{
    if(++count == audioFiles.length)
    p.stop();
    else {
    player = Manager.createPlayer(getClass().getResourceAsStream(audioFiles[count]]),"audio/x-amr" );
    player.addPlayerListener(this);
    player.start();
    }
    }
    catch (Exception e) {
    return;
    }
    }
    }

    }


  2. #2
    Registered User A.Saleh's Avatar
    Join Date
    Apr 2010
    Posts
    4
    i was thinking about another option to reduce the delay, that is to merge the N number of files and create a new one...but i havn't tried this bcz didnt get any clue on how to merge files....any anyone has experienced this...plz help.

  3. #3
    Nokia Developer Moderator r2j7's Avatar
    Join Date
    Aug 2007
    Posts
    1,595
    Hello A.Saleh,

    and welcome to Forum Nokia Discussion Boards!

    Please try not to cross-post over same topic to multiple forums.

    You topic is clearly related to Java ME so please let's continue on the correct forum here:

    Mobile Java|Mobile Java Media (Graphics & Sounds)|how to play two or more audio files in J2me

    Regards,
    r2j7

Similar Threads

  1. Play audio files
    By pankaj gupta55 in forum Symbian C++
    Replies: 17
    Last Post: 2010-04-26, 09:30
  2. How to play multiple .wav files?
    By BenNg in forum Symbian C++
    Replies: 20
    Last Post: 2010-02-22, 15:17
  3. play multiple audio files simultaneously
    By ed_welch in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2008-08-04, 16:55
  4. Cannot play more than 3 audio files?
    By hyon in forum Python
    Replies: 3
    Last Post: 2008-02-18, 05:19
  5. play audio files
    By khalandar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-07, 05: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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved