Implementing a post-processed low-pass filter using core audio
I have implemented a rudimentary low-pass filter using a time based value. This is ok, but trying to find the correct time slice is guess work, and gives different results based on different input audio files. Here is what I have now: - (void)processDataWithInBuffer:(const int16_t *)buffer outBuffer:(int16_t *)outBuffer sampleCount:(int)len { BOOL positive; for(int i = 0; i < len; i++) { positive = (buffer[i] >= 0); currentFilteredValueOfSampleAmplitude = LOWPASSFILTERTIMESLICE * (float)abs(buffer[i]) + (1.0 - LOWPASSFILTERTIMESLICE) * previousFilteredValueOfSampleAmplitude;