处理最小错误:NullPointerException


有人能帮我吗?我不知道发生了什么:(

以下是代码的相关部分:

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

请告诉我哪里做错了。

谢谢大家。我找到了解决方案:https://github.com/ddf/Minim/issues/75

相关内容

  • 没有找到相关文章

最新更新