You Are Here:

Community: Developer Discussion Boards

#1 Old strange problem playing Sound on 7650 - 2003-04-02, 12:43

Join Date: Mar 2003
Posts: 14
Poldipold
Offline
Registered User
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.
Reply With Quote

#2 Old 2003-07-11, 14:12

Join Date: Mar 2003
Posts: 12
theimode
Offline
Registered User
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ