Passing arrays as arguments

Hey, thanks for the clues on this.
I ended up creating a different solution to solve the problem myself - as I couldn’t get the swap method to work.

I converted dynamic array values to static in the constructor when instantiating each object in my class.
Hope this helps anyone trying to sample live data. In my case I am freezing/sampling audio data into a waveform.

class Line {
      float[] staticWave = new float[2048];
      Line(float[] wave){
        for(int i=0; i < wave.length; i++){
          staticWave[i] = wave[i];
        }
1 Like