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: Recording fragments, out of memory
Page Index Toggle Pages: 1
Minim: Recording fragments, out of memory (Read 347 times)
Minim: Recording fragments, out of memory
Jun 20th, 2008, 9:47pm
 
Hi everyone.
I've written a program that records audio for one second, saves the recording to a file and then starts the recorder again to write to a different audio file so that it writes to ten distinct files multiple times.  I'm receiveing the OutOfMemory error after around 2 minutes.  

   recorder.endRecord();
   recording = recorder.save();

   if( fileNum == 10 )
                      fileNum = 0;
   else
                      fileNum++;
   
   recorder = Minim.createRecorder(in, "myRecording_" + Integer.toString(fileNum) +
                                                    ".wav", false);
   recorder.beginRecord();

This code is repeated every second and I'm noticing that the save command and the command to create another recorder seem to add to the memory being used.  Any explanation or alternative ways to do this would be great.  Thanks very much.
Page Index Toggle Pages: 1