×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    4

    difference emulator - real device (nokia)

    hi.

    i'm really frustrated. if anybody could give me some advice, it would be nice.

    i developed a game. with background music. i use the com.nokia.mid.sound package. the code is the following:

    <snip>
    private void playSound(int priority, byte[] bytes) {
    if(!isPaused) {
    try {
    if(sound == null || sound.getState() != Sound.SOUND_PLAYING) {

    sound = new Sound(bytes, Sound.FORMAT_TONE);
    sound.setGain(128);
    sound.play(0);
    currentPriority = priority;
    }
    else {
    if(priority >= currentPriority) {
    sound.stop();
    sound.init(bytes, Sound.FORMAT_TONE);
    sound.play(0);
    currentPriority = priority;
    }
    }
    }
    catch(Exception e) {
    currentPriority = 0;
    }
    }
    }
    </snip>

    on the emulator everything works fine. the sound is playing and looping. but on the real devices (except the nokia 3510i) the sound is either not playing at all, or it stops after a few tones.

    any experiences? any ideas?
    thanks in advance.
    arndt

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    13

    Audio Issues

    Hi

    I have written a document that explains audio issues on mobile devices.

    Check it out: www.jcodeworks.com

Posting Permissions

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