I've developed a game that includes sound effects. In order to help it work well on the widest variety of phones, some sound effects can be produce by:
generating a tone
playing a .wav or .amr file
It also turns out that most S40 phones seem to have hardware for tone generation that appears to produce the tones asynchronously, and without introducing any delay in the program. The more expensive S60 phones do not seem to have tone-generating hardware and producing tones on these phones places a noticeable load on the phone (causing a slight delay in the game action). I have developed a bunch of tricks to determine whether or not the phone has tone-generating hardware, to "cue up" sound files to reduce latency when they need to be displayed, and to play sound files of tones (instead of generating tones) on phones without hardware tone-generation.
It has all been working quite well on many S40 phones including 3610 (S40 5th Ed.) and 6303 (S40, 6th Ed.), but it does not work correctly on 2700 (S40 5th Ed, FP1), where I am getting inconsistent behavior. It appears that the 2700 is happy to play tones,
Manager.playTone (70, 1000, 100);
until I play a .wav file. After I play a .wav file the playTone method produces no sound and throws no exception. Under some circumstances--which I am still trying to identify--the playTone method will start producing tones again. But, the very next time a .wav file is played the playTone method stops producing sounds again.
Has anyone come across this behavior? Does anyone have any ideas?