we're having some problems with audio recording on the Nokia N70. The program is supposed to create a player, record 1 second of audio, close the player, and then do this in a loop many times. After each recording, some analysis is supposed to be done.
The problem is that the program crashes after about 1 hour, with NullpointerException, or just exits. All code related to analysis etc has been taken out to be sure that the problem isn't related to that.
The code above is very standard, so the probelm seem to arise when doing a huge number of recordings. Is there anything we can do to get it to work ? Or any other way we can record and analyze at the same time ?
ByteArrayOutputStream output = new ByteArrayOutputStream();
.....code inside loop.....:
rc = (RecordControl)p.getControl("RecordControl");
// now analyze the recorded 1 second of audio
We have also tried with just commit()'ing and restarting the recording, without re-initializing the player every time, but it didn't work either.
We have also tried different variants with starting the player after starting the recorder etc, but anyway it crashes in the end.