×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    39

    problem playing MIDI in NDS 6310i emulator

    Hi all, I am trying to develop a space shooter and use a midi sound file as background music, i succesfully managed this when emulating using Java's Wireless Toolkit but failed when using Nokia's Developer Suite's default 6310i emulator, could someone point out whats the problem? I will post my code below:

    ------------------------------------------------------------------------------------

    public void commandAction(Command c, Displayable d)
    {
    if(c == quitCommand)
    {

    try
    {
    player.stop();
    }
    catch(MediaException me)
    {}

    midlet.quit();
    }
    else if(c == startCommand)
    {
    start();
    removeCommand(startCommand);
    addCommand(pauseCommand);
    try
    {
    InputStream is = getClass().getResourceAsStream("/test.mid");
    try
    {
    player = Manager.createPlayer(is, "audio/midi");
    }
    catch(IOException e)
    {}
    player.start();
    }
    catch(MediaException me)
    {}
    }
    }

    ------------------------------------------------------------------------------------

    the error messsage showed is "Nokia 6310i MIDP SDK 1.1 <default>: Cannot create class in system package"
    but i think i included what is required( import javax.microedition.media.*, why is this happening, could somebody help? Many thanx!!

    Jin Kai

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I don't think that the 6310i supports the MMAPI. You are going to have to use the Sound class from the Nokia UI API, and that means you can't play MIDI.

    shmoove

Posting Permissions

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