이상한 것. 처리가 계속되거나 처리 웹 사이트의 샘플 코드를 기반으로하는이 코드와 충돌이 발생합니다.처리 fft 충돌
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: RtApiCore::probeDeviceOpen: the device (2) does not support the requested channel count. Could not run the sketch (Target VM failed to initialize).
PC에 그것은 하나의 맥이 맥 그냥 지각이 분쇄 될 때까지 5 초 동안 다른 에서 작동하며 나에게 이것을 제공에 전혀 작동하지 않습니다
도서관이나 코드에 문제가 있다고 생각하십니까? 라이브러리에 문제가있는 경우이 같은 작업을 수행하는 데 가장 좋은 사운드 라이브러리를 추천 할 수 있습니까?
당신이 각도처럼 사용하고 X를 시작 값을 인쇄 할 경우import processing.sound.*;
FFT fft;
AudioIn in;
int bands = 512;
float[] spectrum = new float[bands];
void setup() {
size(900, 600);
background(255);
// Create an Input stream which is routed into the Amplitude analyzer
fft = new FFT(this, bands);
in = new AudioIn(this, 0);
// start the Audio Input
in.start();
// patch the AudioIn
fft.input(in);
}
void draw() {
background(255);
int midPointW = width/2;
int midPointH = height/2;
float angle = 1;
fft.analyze(spectrum);
//float radius = 200;
for(int i = 0; i < bands; i++){
// create the actions for placing points on a circle
float radius = spectrum[i]*height*10;
//float radius = 10;
float endX = midPointW+sin(angle) * radius*10;
float endY = midPointH+cos(angle) * radius*10;
float startX = midPointW+sin(angle) * radius*5;
float startY = midPointH+cos(angle) * radius*5;
// The result of the FFT is normalized
// draw the line for frequency band i scaling it up by 5 to get more amplitude.
line(startX, startY, endX, endY);
angle = angle + angle;
println(endX, "" ,endY);
// if(angle > 360){
// angle = 0;
// }
}
}
당신이 묻고있는 것과 이것이 어떤 언어인지는 약간 불분명합니다. 그것은 C, C++ 및 Java의 요소를 가지고 있습니다. 코드가 무엇을하기로되어 있는지 구체적으로 설명해 주시겠습니까? 파일 기반 분석입니까? 'draw()'가 어떻게 불려지나요? 분석을 위해 어떤 API를 사용하고 있습니까? 관련 정보가 누락되었습니다. – user3078414