×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    14

    strange problem playing Sound on 7650

    Hi!

    I have made a game for N-7650 and it works well, also with sound. Now I made some changes, but no changes in sound or some of the code dealing with sound. What I get since this is the following:

    -----------------------------------------------------------------------------------
    MirrorProtocolParser.invokeMethod(Method, Object[]): Failure!
    --- Error while invoking reflected method : play
    --- Target exception was:java.lang.NullPointerException
    java.lang.NullPointerException
    at com.nokia.phone.sdk.concept.mirrors.mid.sound.tones.WavTone.play([Das
    hoPro-V1.32-013000])
    at com.nokia.phone.sdk.concept.mirrors.mid.sound.SoundMirror3.play([Dash
    oPro-V1.32-013000])
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at s60midpn.a([DashoPro-V1.32-013000])
    at s60midpn.a([DashoPro-V1.32-013000])
    at s60midpm.run([DashoPro-V1.32-013000])
    at java.lang.Thread.run(Thread.java:536)
    MirrorProtocolParser.invokeMethod(Method, Object[]): Failure!
    -----------------------------------------------------------------------------------

    The code for loading the sound is:

    -----------------------------------------------------------------------------------
    class Wav {

    private InputStream is;
    private byte[] s;

    public byte[] load(String name, int len) {

    is = getClass().getResourceAsStream("/"+name);
    s=new byte[len];
    try {
    is.close();
    }
    catch (java.io.IOException e) {
    System.err.println("Unable to locate or read Soundfiles");
    }
    is=null;
    return (s);
    }
    }
    -----------------------------------------------------------------------------------


    for playing the sound:
    -----------------------------------------------------------------------------------
    try {
    shift.stop();
    disappear.stop();
    shift.play(1);
    }
    catch (Exception e) {
    System.out.println(e);
    }
    -----------------------------------------------------------------------------------

    ... but no exception occurs.

    It's the same code as in the former version of the game, where the sound works well, the wav-files are also the same.

    I really do not have any idea what went wrong ...

    Please help me!!!

    thanks in advance
    Thomas.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    12
    Hi,

    I also keep getting this but in the Series 60 MIDP Beta 0.2 emulator.

    One minute it was working, the next I got this message - it is however an intermittent problem. Possibly a thread conflict somewhere ?


    Regards,
    Lee

Posting Permissions

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