Hello~!
I'm trying to convert a set of sounds which use the NOKIA API, to play them using standard MIDP 2.0 API methods, but I'm having a little trouble with the format...
It seems that the sound is tone-based, and is played through the Sound class...
I wish to convert it using the following methods:Code://Sound( byte [] data, int type ); Sound sound = new Sound( soundBuffer, Sound.FORMAT_TONE ); //of course, soundBuffer is a byte array containing the sound data
My only problem is that I don't know the format in which the sound data (which is already provided to me) is stored in the byte array, thus, I can't reformat it to fit an appropriate sequence for toneControl...Code:Player p = Manager.createPlayer( Manager.TONE_DEVICE_LOCATOR ); p.realize(); ToneControl t = ( ToneControl )p.getControl( "ToneControl" ); t.setSequence( soundBuffer );//not good! Sound format is incorrect? p.start();//hangs right after calling this method...
If anyone could point out to me the format in which the NOKIA Sound class expects the data in the byte array, that would be a huge help!

Reply With Quote


