Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Minim AudioRecorder Memory Consumption

$
0
0
Does anyone know how to tame Minim’s memory consumption when recording files? I know that there is a boolean value to indicate wether AudioRecorder uses a memory buffer or writes directly to a file, but both ways seem to result in a rise of memory. Try the code and look at your Activity Monitor. Every time you press a key, memory goes up. Is there any way to get around this and make it stable to be able to record a lot?

  1. import ddf.minim.*;

  2. Minim minim;
  3. AudioRecorder recorder;
  4. AudioInput in;

  5. void setup() {
  6.   minim = new Minim(this);
  7.   in = minim.getLineIn(Minim.MONO);
  8. }
  9. void draw() {

  10. }

  11. void keyPressed() {
  12.   recorder = minim.createRecorder(in, "foo.wav", false);
  13.   recorder.beginRecord();
  14. }

  15. void keyReleased () {
  16.   recorder.endRecord();
  17.   recorder.save();
  18.   println("Saved a record using no buffer");
  19. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles