×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    3

    player.start() Media exception


    Hi,
    Im getting problem in playing midi file. This application does not give any exception on emulator. Problem occurs when i strats on phone after installation. The MediaException occcurs when the p.start() function calls. I added api permissions and my midlet is signed. Can uplease help me
    my code snippet is givenbelow,

    this.checkContentType("file");
    if(bool)
    {
    try{
    in = getClass().getResourceAsStream("/resource/Mozart1.mid");
    p = Manager.createPlayer(in,"audio/midi");
    p.realize();
    p.prefetch();
    p.addPlayerListener(this);
    }catch(Exception ex){
    Display.getDisplay(this).setCurrent(new Alert("Exception ",(ex.toString()),null,AlertType.WARNING));
    }

    try
    {
    p.start();
    } catch (Exception ex)
    {
    Display.getDisplay(this).setCurrent(new Alert("Start",(ex.toString()),null,AlertType.WARNING));
    }

    } else {
    Display.getDisplay(this).setCurrent(new Alert("","Content type Not supported",null,AlertType.WARNING));
    }

    please help me,
    [/SIZE][/SIZE]

  2. #2
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: player.start() Media exception

    Hi,
    Which phone are you using
    Soku

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    3

    Re: player.start() Media exception

    Im using Nokia 6233

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    24

    Re: player.start() Media exception

    if u please check the folder resource u hav or not.
    otherwise please use lik this
    getClass().getResourceAsStream("/Mozart1.mid");

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    24

    Re: player.start() Media exception

    sorry for the mistake ur extension.midi file or .mid file.please check the property of the file.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    3

    Re: player.start() Media exception

    I solved thanks for ur cooperation
    thanks alot

Similar Threads

  1. VS.Net 2003 Carbide 2.01 and epoc32.exe
    By ValentinK in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-01-12, 12:31
  2. Security Exception on N6280 for creating directory on media card
    By break10ose in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-08-01, 00:28
  3. SIP content type
    By hlothman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2006-05-17, 09:26
  4. media intensive app - Hell Bug.(s60- 3650)
    By EridanMan in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-04-21, 03:27
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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