关于 SuperpoweredFilter(作为模拟滤波器)。一个音频系统(SuperpoweredAudioIO)中是否可以有高通和低通滤波器类型的两个实例?因为我尝试了不同的方法,但声明的最后一个过滤器类型的实例仅在运行时才能听到。请帮忙
这是我对这两种情况的声明;
filter = new SuperpoweredFilter(SuperpoweredFilter_Resonant_Highpass, samplerate);
filterb = new SuperpoweredFilter(SuperpoweredFilter_Resonant_Lowpass, samplerate);
audioSystem = new SuperpoweredAndroidAudioIO(samplerate, buffersize, false, true, audioProcessing, this, -1, SL_ANDROID_STREAM_MEDIA, buffersize * 2);
filterb->setResonantParameters(floatToFrequency(1.0f), 0.2f);
filter->setResonantParameters(floatToFrequency(1.0f), 0.2f); //resonance
filterb->enable(true);
filter->enable(true);
playerA->play(false);
同样在音频处理方法中,我调用了
filterb->process(stereoBuffer, stereoBuffer, numberOfSamples);
filter->process(stereoBuffer, stereoBuffer, numberOfSamples);