File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes trouble running audio .mp3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "trouble running audio .mp3" Watch "trouble running audio .mp3" New topic

trouble running audio .mp3

Andre Simoes

Joined: Aug 18, 2011
Posts: 3
I am doing a J2ME dictionary, and is working great, but the audio on the phone only runs seven times after that to restart the application, and after seven times he no longer runs the audio and have to restart again.
Does anyone know where this error?
Below is the full source code for that test, you only need to insert an audio in the src folder with the name "a.mp3."

I think it's something with the memory, which is filled by players and it is necessary to create esvaziala after the execution of the audio, but I do not know how.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10825

Most probably you are running into memory/resource issues.

Why are you instantiating the player every time? Just check if its null, if yes, initialize it else use it.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: trouble running audio .mp3
It's not a secret anymore!