Sound in 3510i
Hi I'm using the Sound class to play sound on the 3510i in a midlet. The sound seems to work fine when the midlet is running and the device is not connected to the network, but when connected to the internet to download info to the midlet via http, the sound refuses to play. After disconnecting, the sound starts again. The application works fine in the emulator, both connected and disconnected. Is this a bug or feature in the phone? If so, is there a workaround?
The application is probably blocked with the HTTP code. Is this being done in a separate thread? I've read somewhere that some methods of the Connector and HttpConnection classes block all the rest of the threads in the application, so you might want to consider start playing the sound after the HTTP code is done.
I also want to add sound to my 3510i app. But unfortunately I am sound-iliterate. I have sound on the 7650, that's simple because it supports WAV format. But what do I need to do to play it (or something similar) on the 3510i? Is there any tool to convert the WAV file into a MIDI file (I think that's what I need for the 3510i, right?)? Then should I just use Sound.FORMAT_TONE as the second parameter to the constructor and init()?
hmmmm... The sound was not being played until after the http connection was disconected, but thanks for the idea. It looks like the problem is to do with the bearer. I was using GSM, and had the problem, as soon as I switched to GPRS, no problem - bizarre...
As far as the sound basics are concerned, yep you are right, its very easy, just create the Sound object initialise and play! Use format_tone. And the utility you need for converting MIDI files can be found in Nokia Developer's Suite for J2ME. Don't try to use anything other than straight OTT data though as it just doesn't work :)