有谁能够帮助我?我不知道发生了什么:(
下面是代码的相关部分:
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);
}
这是错误的相关部分:
==== 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
请告诉我我在哪里做错了。