Hi Folks,
Im really stuck at this:
I have developped a game completely in MIDP 1.0. Now I want to have all these nice feats of the Nokia UI. I downloaded
the Nokia_7210_MIDP_SDK_v1_0
to compile and test my application.
FullScreen is working fine on my Ngage Phone and on all the emulators.
When I try to use Sound,( just started with playing a tone. (Sound play( freq, duration )))
it does work on the emulator, i can hear a nice beep. BUT it DOES NOT work on the Ngage phone. Though the play function is called, i cant hear the sound.
In other apps the sound does work so it is not because the Sound is Off.
Does anyone have an idea about whats going on ? Im implementing the sound just like its shown in the Tones Documentation from forum nokia:
This method is used to load a toneplayer
The TonePlayer is just an empty dummy
NokiaTonePlayer is a subClass of toneplayer which ueses the NOKIA UI .
and has a "Sound" variable, played via
snd.play(440,2000L);
*****
public static TonePlayer makeTonePlayer(){
TonePlayer player;
try {
// This statement throws an exception if no Nokia UI API available
Class.forName("com.nokia.mid.sound.Sound");
// If we get here, Nokia UI API is available, so we can safely
// create a player that uses it. But we use Class.forName rather
// than 'new' so that there is no link dependency.
Class clas = Class.forName("scim.bd.NokiaTonePlayer");
player = (TonePlayer)(clas.newInstance());
using = "Nokia";
}catch (Exception e) {
// If no Nokia UI API, then create a dummy tone player
player = new TonePlayer();
using = "default";
}
return player;
}
*****
In my game the nokia Player is actually used. ( using is always set to "Nokia" on both phone and emulators)
But still i hear no beep on the Phone.
Does anybody have an idea? or maybe a peace of functional code( I'm Using MIDP 1.0 )
big thx in advance
.ilya

Reply With Quote


