Skip to content

Commit

Permalink
OboeTester: clean up TapLatencyAnalyzer
Browse files Browse the repository at this point in the history
Remove unused code.
  • Loading branch information
philburk committed Jan 13, 2021
1 parent f7ecdb6 commit 8e708ce
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public float[] getFilteredBuffer() {
private void highPassFilter(float[] buffer, int offset, int numSamples, float[] highPassBuffer) {
float xn1 = 0.0f;
float yn1 = 0.0f;
float alpha = 0.05f;
final float alpha = 0.05f;
for (int i = 0; i < numSamples; i++) {
float xn = buffer[i + offset];
float yn = alpha * yn1 + ((1.0f - alpha) * (xn - xn1));
Expand Down Expand Up @@ -87,22 +87,14 @@ private TapLatencyEvent[] scanForEdges(float[] peakBuffer, int numSamples) {

private void fillPeakBuffer(float[] buffer, int offset, int numSamples, float[] peakBuffer) {
float previous = 0.0f;
float maxInput = 0.0f;
float maxOutput = 0.0f;
for (int i = 0; i < numSamples; i++) {
float input = buffer[i + offset];
if (input > maxInput) {
maxInput = input;
}
float output = previous * mDroop;
if (input > output) {
output = input;
}
previous = output;
peakBuffer[i] = output;
if (output > maxOutput) {
maxOutput = output;
}
}
}
}

0 comments on commit 8e708ce

Please sign in to comment.