We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Minim lag (Read 497 times)
Minim lag
Mar 22nd, 2008, 1:16am
 
Is there a way to load in a large audio file and jump to different parts without a big lag. Right now the file is 1 hour, and jumping to parts inside of it gives this error:

Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space
at ddf.minim.MMP3File.skip(MMP3File.java:275)
Re: Minim lag
Reply #1 - Mar 22nd, 2008, 5:13am
 
The way to do this without lag is to load the entire file into memory. MMP3File is not loading the entire file into memory, it reads it as it needs it. I imagine you are running out of memory because the way it reads it is by decoding many successive small chunks and the discarding the array. However, if you are skipping a large amount, I imagine it would be possible for heap space to be eaten up before the garbage collector kicks in on the discarded arrays.
Page Index Toggle Pages: 1