Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
AudioClock.h | D | 23-Nov-2023 | 2.4 KiB | 76 | 34 | |
AudioSourceCaller.cpp | D | 23-Nov-2023 | 1.5 KiB | 39 | 19 | |
AudioSourceCaller.h | D | 23-Nov-2023 | 2.3 KiB | 84 | 36 | |
AudioStream.cpp | D | 23-Nov-2023 | 6.8 KiB | 212 | 161 | |
AudioStreamBuilder.cpp | D | 23-Nov-2023 | 8.7 KiB | 232 | 164 | |
DataConversionFlowGraph.cpp | D | 23-Nov-2023 | 10.5 KiB | 244 | 175 | |
DataConversionFlowGraph.h | D | 23-Nov-2023 | 2.9 KiB | 87 | 43 | |
FilterAudioStream.cpp | D | 23-Nov-2023 | 4.2 KiB | 107 | 57 | |
FilterAudioStream.h | D | 23-Nov-2023 | 7.3 KiB | 226 | 133 | |
FixedBlockAdapter.cpp | D | 23-Nov-2023 | 1 KiB | 39 | 18 | |
FixedBlockAdapter.h | D | 23-Nov-2023 | 2 KiB | 68 | 25 | |
FixedBlockReader.cpp | D | 23-Nov-2023 | 2.4 KiB | 74 | 47 | |
FixedBlockReader.h | D | 23-Nov-2023 | 1.9 KiB | 61 | 16 | |
FixedBlockWriter.cpp | D | 23-Nov-2023 | 2.4 KiB | 74 | 43 | |
FixedBlockWriter.h | D | 23-Nov-2023 | 1.7 KiB | 55 | 14 | |
LatencyTuner.cpp | D | 23-Nov-2023 | 3.6 KiB | 109 | 67 | |
MonotonicCounter.h | D | 23-Nov-2023 | 3.1 KiB | 113 | 41 | |
OboeDebug.h | D | 23-Nov-2023 | 1.3 KiB | 42 | 18 | |
QuirksManager.cpp | D | 23-Nov-2023 | 9 KiB | 223 | 150 | |
QuirksManager.h | D | 23-Nov-2023 | 4.1 KiB | 132 | 60 | |
README.md | D | 23-Nov-2023 | 1.3 KiB | 34 | 25 | |
SourceFloatCaller.cpp | D | 23-Nov-2023 | 1 KiB | 31 | 12 | |
SourceFloatCaller.h | D | 23-Nov-2023 | 1.3 KiB | 45 | 19 | |
SourceI16Caller.cpp | D | 23-Nov-2023 | 1.5 KiB | 48 | 25 | |
SourceI16Caller.h | D | 23-Nov-2023 | 1.4 KiB | 49 | 23 | |
StabilizedCallback.cpp | D | 23-Nov-2023 | 4.4 KiB | 112 | 53 | |
Trace.cpp | D | 23-Nov-2023 | 2.2 KiB | 75 | 43 | |
Trace.h | D | 23-Nov-2023 | 870 | 31 | 11 | |
Utilities.cpp | D | 23-Nov-2023 | 11.2 KiB | 306 | 254 | |
Version.cpp | D | 23-Nov-2023 | 1,014 | 29 | 7 |
README.md
1# Notes on Implementation 2 3## Latency from Resampling 4 5There are two components of the latency. The resampler itself, and a buffer that 6is used to adapt the block sizes. 7 81) The resampler is an FIR running at the target sample rate. So its latency is the number of taps. 9From MultiChannelResampler.cpp, numTaps is 10 11 Fastest: 2 12 Low: 4 13 Medium: 8 14 High: 16 15 Best: 32 16 17For output, the device sampling rate is used, which is typically 48000.For input, the app sampling rate is used. 18 192) There is a block size adapter that collects odd sized blocks into larger blocks of the correct size. 20 21The adapter contains one burst of frames, from getFramesPerBurst(). But if the app specifies a 22particular size using setFramesPerCallback() then that size will be used. 23Here is some pseudo-code to calculate the latency. 24 25 latencyMillis = 0 26 targetRate = isOutput ? deviceRate : applicationRate 27 // Add latency from FIR 28 latencyMillis += numTaps * 1000.0 / targetRate 29 // Add latency from block size adaptation 30 adapterSize = (callbackSize > 0) ? callbackSize : burstSize 31 if (isOutput && isCallbackUsed) latencyMillis += adapterSize * 1000.0 / deviceRate 32 else if (isInput && isCallbackUsed) latencyMillis += adapterSize * 1000.0 / applicationRate 33 else if (isInput && !isCallbackUsed) latencyMillis += adapterSize * 1000.0 / deviceRate 34