INNER CODE UNIT · Python
capacityMillis
google/oboe · apps/OboeTester/scripts/dsp_timing.py:172
capacityMillis = capacity * 1000.0 / sampleRate
print "capacityMillis = " + str(capacityMillis)
if pairs['in.mmap'].strip() != "yes":
print "ERROR Not using input MMAP"
return True
if pairs['out.mmap'].strip() != "yes":
print "ERROR Not using output MMAP"
return True
# Check whether we can change latency a moving the DSP pointer
# past the CPU pointer and wrapping the buffer.
latencyMin = runOneLatencyTest(kOffsetMin)
latencyMax = runOneLatencyTest(kOffsetMax + 1000)
print "latency = " + str(latencyMin) + " => " + str(latencyMax)
if latencyMax < (latencyMin + (capacityMillis / 2)):
print "ERROR Latency not affected by changing offset!"
return True
return False