2
因此,我正在制作一个使用处理的音频程序,并且遇到了一个小路障,因为当我告诉minim从音频中删除音频信号(正弦波)时输出,它会以一个小的弹出声音结束,我知道的是在振幅不是并且扬声器认为它应该尝试从声音的振幅跳到0时跳过声音的程序。处理Minim:当幅度为0时删除信号
我该怎么去当幅度为0而不是每当信号被调用时消除音频信号?
播放函数被主程序每3帧调用一次。 out是复调。谢谢
public void play(int column){
for (int i = 0; i < notes[column].length; i++){
if (column == 0){ //special case when the current time indicator is 0
if (notes[notes.length-1][i] == true && notes[column][i] == false){ // find previous notes on this row
out.removeSignal(sounds[i]);
}
if (notes[notes.length-1][i] == false && notes[column][i] == true){
out.addSignal(sounds[i]);
}
}
else{
if (notes[column-1][i] == true && notes[column][i] == false){
out.removeSignal(sounds[i]);
}
if (notes[column-1][i] == false && notes[column][i] == true){
out.addSignal(sounds[i]);
}
}
}
}