Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Processing minim ERROR:NullPointerException

can anybody help me? I don't know what happened:(

Heres the relevant part of the code:

import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;

Minim minim;
AudioInput microphone; 

void setup() 
{
  size(600, 600);
  minim = new Minim ( this );
  microphone = minim.getLineIn();
}

void draw() 
{
  
  float backgroundCol = microphone.mix.level() * 255 *10;
  float rectSize = microphone.mix.level() * 800.0;
  background(backgroundCol,backgroundCol,backgroundCol);
 
}

Heres the relevant part of the error:

==== JavaSound Minim Error ====
==== Unable to return a TargetDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

=== Minim Error ===
=== Minim.getLineIn: attempt failed, could not secure an AudioInput.

NullPointerException

Please tell me where I'm doing wrong.

like image 700
any N Avatar asked Aug 15 '26 13:08

any N


1 Answers

Thanks, all. I found solution:https://github.com/ddf/Minim/issues/75

like image 72
any N Avatar answered Aug 17 '26 04:08

any N



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!