• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemoryError when playing Audio Files

 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

I am experimenting with Mobile Media API. Its a simple midlet. The user can 'repeatedly' play audio files. They are in MIDI format. Size is around 2.5 K.

I am getting an OutOfMemeoryError if I play sounds, 10 or 15 times repeatedly. Do you think that audio files consume lot of memory ?

Danish
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently you have a memory leak of some sort. Could you describe how the (re)play function is implemented and how do you cleanup?
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was not calling the player.close() method. It releases resources. Now its working fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic