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.
IndexProgramming Questions & HelpSound,  Music Libraries › minim, looong recordings, out of memory
Page Index Toggle Pages: 1
minim, looong recordings, out of memory (Read 928 times)
minim, looong recordings, out of memory
Jan 8th, 2008, 9:48am
 
hi,

one of my students is trying to set up an applet to be able to record really long chunks of audio (people telling stories, couple of minutes). we've got it working as for the recording part (it's signed) but are now running into memory problems. any ideas on how to set it up to record 5-10 minutes or ideally endlessly?

sidenote: i tried reading Runtime.getRuntime().freeMemory() and it reports enough to go on recording but still i get out-of-memory errors ..? is this happening outside of java / the vm?

thanks
F
Re: minim, looong recordings, out of memory
Reply #1 - Jan 9th, 2008, 4:35am
 
If you're really sure you're not doing something that can obviously be used to reduce memory usage (reusing large amounts of objects, or such truck) then the VM parameter (in eclipse, go to run...) that most of us here use for our sketches (loading images can fill up the mem pretty fast):

Code:

-Xmx512M


Seriously. It's that easy!
Re: minim, looong recordings, out of memory
Reply #2 - Jan 9th, 2008, 8:57am
 
no it's not .. this is an applet!

thanks
F
Re: minim, looong recordings, out of memory
Reply #3 - Jan 10th, 2008, 3:55am
 
You best bet would be to use a streaming audio recorder, rather than a buffered one. Then the audio will be written out to file as it is being recorded, rather than being stored all in memory and then written at the end.
Re: minim, looong recordings, out of memory
Reply #4 - Jan 10th, 2008, 9:15am
 
okie, good idea. i'll see how that goes.

thanks!
F
Page Index Toggle Pages: 1