Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trouble running audio .mp3

 
Andre Simoes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic