×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    16

    Sound problem with 6600

    I write a simple program that works fine on 6610, but on 6600 it throw an strange exeptions and I'm 90% sure that I have promlems in sound. I call function playPoint() some times for a second, but sound is very short.

    import javax.microedition.lcdui.*;
    import java.io.*;
    import com.nokia.mid.sound.*;

    public class SoundPlayer {
    private String file;
    byte[] intro = {
    (byte)0x02, (byte)0x4a, (byte)0x3a, (byte)0x40,
    (byte)0x04, (byte)0x00, (byte)0x57, (byte)0x18,
    (byte)0x83, (byte)0x94, (byte)0x49, (byte)0xca,
    (byte)0x17, (byte)0xa1, (byte)0x4a, (byte)0x1c,
    (byte)0xa1, (byte)0x7a, (byte)0x10, (byte)0x81,
    (byte)0x48, (byte)0x91, (byte)0xa2, (byte)0x88,
    (byte)0xd1, (byte)0x26, (byte)0x28, (byte)0x56,
    (byte)0x8a, (byte)0x23, (byte)0x44, (byte)0x98,
    (byte)0xa1, (byte)0x08, (byte)0x15, (byte)0x8a,
    (byte)0x0e, (byte)0x51, (byte)0x27, (byte)0x28,
    (byte)0x5e, (byte)0x85, (byte)0x28, (byte)0x72,
    (byte)0x85, (byte)0xe8, (byte)0x42, (byte)0x05,
    (byte)0x22, (byte)0x52, (byte)0x85, (byte)0x68,
    (byte)0x5a, (byte)0x85, (byte)0xa8, (byte)0x5e,
    (byte)0x86, (byte)0x28, (byte)0x62, (byte)0x86,
    (byte)0x68, (byte)0x6a, (byte)0x87, (byte)0x20,
    (byte)0x00
    };

    private byte[] point = {
    (byte) 0x02, (byte) 0x4A, (byte) 0x3A, (byte) 0x80, (byte) 0x40,
    (byte) 0x00, (byte) 0x91, (byte) 0xCC, (byte) 0x59, (byte) 0xCA,
    (byte) 0x00, (byte) 0x00};

    public SoundPlayer() {

    }
    public Sound playIntro() {
    try {
    Sound sound = new Sound(intro, Sound.FORMAT_TONE);
    sound.play(1);
    return sound;
    } catch (Exception e) {
    return null;
    }
    }
    public Sound playPoint() {
    try {
    Sound sound = new Sound(point, Sound.FORMAT_TONE);
    sound.play(1);
    return sound;
    } catch (Exception e) {
    return null;
    }
    }
    }

  2. #2
    Registered User
    Join Date
    Apr 2004
    Posts
    8
    Try not to use the Nokia Sound API... try using the MIDP 2 sound functions instead...
    I think i read somewhere that Nokia says its better to use MIDP 2 on this phone rather than the Nokia API.

    Hope this helps you

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    16

    Re:

    I don't like this solution. I just want my program work on all NOKIA phones.

  4. #4
    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
  •  
×