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

Re : Minim and Real Memory / Memory

$
0
0
Hi,

thanks for the input.

It seems to work like this, yet it increases the Real Memory constantly.

What I'm doing is:


  1. void setup(){
  2. ...

  3. voiceSampleSingleA = new FilePlayer[noOfSamples];
  4.   
  5.   mainOut = minim.getLineOut();
  6.    
  7.      for (int i = 0; i < filenames.length; i++) {
  8.        voiceSampleSingleA[i] = new FilePlayer(minim.loadFileStream( folder + "/" + filenames[i], 1024, true ));
  9.      }
  10.      
  11.      voiceSampleSingleA[1].patch( mainOut );

  12. void serialEvent (Serial myPort) {

  13.       int chosenItem = NoOfSampleToBePlay;

  14. voiceSampleSingleA[chosenItem].rewind();
  15.   voiceSampleSingleA[chosenItem].play();  
  16.   voiceSampleSingleA[chosenItem].patch( mainOut );

  17. }


Then I should be closing it or not?

Thanks!


Viewing all articles
Browse latest Browse all 1768

Trending Articles