1[Home](README.md) 2 3# How to Use OboeTester 4 5## Test Activities 6 7Launch OboeTester and then select one of the test Activities. 8 9### Test Output 10 11Tap the green bar to expand the Settings display. 12 13Test opening, starting, stopping and closing a stream. 14Various stream parameters can be selected before opening. 15While the stream is playing, the frame counts and stream state are displayed. 16The latency is estimated based on the timestamp information. 17 18Experiment with changing the buffer size to see if there are glitches when the size is high or low. 19 20Experiment with changing the "Workload". 21Watch the frame counters and the #XRuns. 22The audio is expected to glitch when the workload is high because there is too much work 23and the audio task misses its delivery deadlines. 24 25The extra workload is generated by calculating a random number in a loop and then adding the result to the output at an inaudible level. This technique prevents the compiler optimizer from skipping the work. 26 27### Test Input 28 29Test input streams. Displays current volume as VU bars. 30 31### Tap to Tone Latency 32 33Measure touch screen latency plus audio output latency. 34Open, Start, then tap on the screen with your fingertip. 35The app will listen for the sound of your fingernail tapping the screen 36and the resulting beep, and then measure the time between them. 37If you use headphones then you can eliminate the latency caused by speaker protection. 38If you use USB-MIDI input then you can eliminate the latency due to the touch screen, which is around 15-30 msec. 39MIDI latency is generally under 1 msec. 40 41### Record and Play 42 43* Tap RECORD to record several seconds of audio. You should see the red VU meters move. 44* Tap STOP then PLAY to play it back. 45* Tap SHARE button to the recorded WAV file to GDrive, GMail or another app. 46You can then examine the WAV file using a program like Audacity. 47 48### Echo Input to Output 49 50This test copies input to output and adds up to 3 seconds of delay. 51This can be used to simulate high latency on a phone that supports low latency. 52Try putting the phone to your ear with the added delay at 0 and try talking. 53Then set it to about 700 msec and try talking on the phone. Notice how the echo can be very confusing. 54 55The test will also display estimated "cold start latency" for full duplex streams. 56 57### Round Trip Latency 58 59This test works with either a [loopback adapter](https://source.android.com/devices/audio/latency/loopback) or through speakers. 60Latency through the speakers will probably be higher. 61It measures the input and output latency combined. 62Set the volume somewhere in the middle. 63 64The test works by sending a random series of bits encoded using smoothed Manchester Encoding. 65This signal has a very sharp peak when we correlate output and input. 66So it works at almost any volume. But the confidence will be higher at higher volumes. 67 68### Glitch Test 69 70This test works best with a loopback adapter. But it can also work in a quiet room. 71It plays a sine wave and then tries to record and lock onto that sine wave. 72If the actual input does not match the expected sine wave value then it is counted as a glitch. 73The test will display the maximum time that it ran without seeing a glitch. 74 75Look for the #XRuns display. 76If #XRuns increments when a glitch occurs then the glitch is probably due to preemption of the audio task. 77If #XRuns is not incrementing then the glitches may be due to AAudio MMAP tuning errors in the HAL. 78 79### Auto Glitch Test 80 81Measure glitches for various combinations of input and output settings. 82Change the test duration to a high value and let it run for a while. 83If you get glitches in one configuration then you can investigate using the previous manual Glitch Test. 84The Share button will let you email the report to yourself. 85 86### Test Disconnect 87 88You can test whether the disconnect logic is working in Android by plugging or unplugging a headset. 89Just follow the instructions in red. You will get a report at the end that you can SHARE by GMail or Drive. 90 91### Data Paths 92 93This checks for dead speaker and mic channels, dead Input Presets and other audio data path problems. 94 951. Tap "DATA PATHS" button. 961. Unplug or disconnect any headphones. 971. Set volume to medium high. 981. Place the phone on a table in a quiet room and hit START. 991. Wait a few minutes, quietly, for the test to complete. You will hear some sine tones. 1001. You will get a report at the end that you can SHARE by GMail or Drive. 101