summaryrefslogtreecommitdiff
path: root/LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2016-08-04 15:18:50 -0700
committerGlenn Kasten <gkasten@google.com>2016-08-04 15:36:48 -0700
commit144dd00dcb045631df54ec7c755288a1dadeddc3 (patch)
treec0514070d3a01ca0f11e26d208f91250202b65c1 /LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java
parentc58bf2f1d8871c89e1d32b237193997cd55ec7d1 (diff)
downloaddrrickorang-144dd00dcb045631df54ec7c755288a1dadeddc3.tar.gz
Version 15
Snap to commit 1265b7e83b43ebc8227d9243591914ea0721cec4 Allow enabling systrace and bugreport captures separately in LoopbackApp. Capturing a bugreport takes a lot of time and CPU power. The CPU usage may cause another glitch, or an unrelated glitch may be missed because the app is waiting for a bugreport to complete. Capture systrace/bugreport on late callbacks in LoopbackApp. Remove obsolete method for systrace from native code in LoopbackApp. The code for this was unused. Add more atomic methods to audio_utils in LoopbackApp. Note that these methods are temporary until we can move to the standard atomic library for C++. Discard player callbacks if recorder is not yet running. Display channelIndex in LoopbackApp as MONO when appropriate. Iteratively calculate variance in LoopbackApp for Java. Iteratively calculate variance in LoopbackApp for native only. It is converted into standard deviation and reported by the app. Refactor statistics recording into a new function in LoopbackApp. This will make it easier to add new metrics and adjust the existing ones. Deduplicate code dealing with buffer period stats in LoopbackApp. Previously, the code for the recorder and player was copied and pasted with minimal changes. Fix build warning. Refactor LoopbackApp buffer stats into one struct. By unifying the player and recorder stats, copy-pasted code can be eliminated and adding new statistics is made much easier. Fix how late buffer callbacks are counted in LoopbackApp. The previous calculation id not take rounding into account which causes it to incorrectly label callbacks which occured only 1 ms late as over the threshold of 2 ms late. This results in the metric being oversensitive and flaky. Add setting to LoopbackApp to ignore beginning of recording. This is useful to work around hardware bugs that cause pops or other noise at the beginning of a recording.
Diffstat (limited to 'LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java')
-rw-r--r--LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java b/LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java
index d88b065..e52c116 100644
--- a/LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java
+++ b/LoopbackApp/app/src/main/java/org/drrickorang/loopback/GlitchDetectionThread.java
@@ -16,10 +16,10 @@
package org.drrickorang.loopback;
-import java.util.Arrays;
-
import android.util.Log;
+import java.util.Arrays;
+
/**
* This thread is responsible for detecting glitches in the samples.
@@ -213,7 +213,7 @@ public class GlitchDetectionThread extends Thread {
// Glitch Detected
mGlitches[mGlitchesIndex] = mFFTCount;
mGlitchesIndex++;
- if (mCaptureHolder.isCapturingSysTraces() || mCaptureHolder.isCapturingWavs()) {
+ if (mCaptureHolder.isCapturing()) {
checkGlitchConcentration();
}
}