Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Minim getGain() only returns value -64

$
0
0

I'm trying to get the decibel level from the microphone on my laptop. I'm using Minim but if there's another simpler way please let me know.

This code only returns the value -64. What am i doing wrong?

import ddf.minim.*;

Minim minim;
AudioInput in;

void setup()
{
  minim = new Minim(this);
  minim.debugOn();


  in = minim.getLineIn(Minim.STEREO, 512);
}

void draw()
{
 println(in.getGain());
}

void stop()
{

  in.close();
  minim.stop();

  super.stop();
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles