| Reply | « Previous Thread | Next Thread » |
|
Hi, I'm trying to play an audo file with j2me and mmapi, but it crashes and I don't know why. This is my code:
Code:
try {
servidor.append("Archivo cargado\n");
m_player = Manager.createPlayer(is, "audio/mp3");
m_player.realize();
// get volume control for player and set volume to max
vc = (VolumeControl) m_player.getControl("VolumeControl");
if(vc != null) {
vc.setLevel(100);
}
} catch(Exception e) {
e.printStackTrace();
servidor.append("error");
}
try {
m_player.prefetch();
} catch (MediaException ex) {
ex.printStackTrace();
servidor.append(ex.getMessage());
}
try {
servidor.append("estado actual:"+m_player.getState()+"\n");
m_player.start();
} catch (MediaException ex) {
ex.printStackTrace();
servidor.append(ex.getMessage());
}
"prefetch error: -5" but I can't find what kind of error is, and how to fix it. The file is in the sd file, but I've tried with files in local memory too. Thanks for your help Edit: my phone is a nokia n73 |
|
hi ouendan. I have had that problem, i think...i don't renember. But check the size of the file, maybe it is to big to be loaded in memory (task that the player do)...or you can try to audio/mpeg instaed of audio/mp3...
i hope that's work. Bueno eso es todo, solamente veo que vos tambien sos de latino america, así que no puedo evitar pegarte un saludo!!. (La respuesta fue en ingles para que a todos sirva, bah si sirve para algo..jejej) Nos vemos!. Cya!! |
| Vitucho5005 |
| View Public Profile |
| Find all posts by Vitucho5005 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| MMAPI and jsr75 in one midlet = fatal problem | dusanbaranec | Mobile Java General | 8 | 2006-06-07 08:18 |
| Midi file playing problem | haristeguh | Mobile Java Media (Graphics & Sounds) | 0 | 2006-04-06 02:02 |
| MMAPI Problem | chriditz | Mobile Java General | 1 | 2004-08-02 06:58 |
| mmapi 3660 memory problem | Leicester22 | Mobile Java Media (Graphics & Sounds) | 0 | 2004-07-30 18:01 |
| S90 MIDP SDK 1.0 Beta MMAPI Problem | kfalck | Mobile Java Tools & SDKs | 0 | 2004-06-21 20:44 |