0

I've been using FFT and it's working on audios within 1 hour but when I load a 2 hour audio it's giving me java.lang.OutOfMemoryError: Java heap space. Also, for extra information, I've been using the -Xmx1g to override it but, is there a way to not use it?

This is my code in FFT https://stackoverflow.com/a/27517678/4442430

Community
  • 1
  • 1
keion
  • 1
  • 1
    This is your bes bet: http://stackoverflow.com/questions/2073869/how-to-increase-java-heap-size-programmatically – Rgw3d Jan 11 '15 at 14:38
  • If you look at the size of the audio you'll have to allocate more than twice that amount in JVM memory since you are storing all the audio of 16 bit data as 32 bit numbers. If you don't need to store all the audio in memory, ie if you're just looking for min/max values, you should keep track of the min/max values separately and avoid storing all the audio in memory. – JimW Jan 11 '15 at 16:18

0 Answers0