Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
AudioClock.h | H A D | 29-Nov-1973 | 2.4 KiB | 76 | 34 | |
AudioSourceCaller.cpp | H A D | 29-Nov-1973 | 1.5 KiB | 39 | 19 | |
AudioSourceCaller.h | H A D | 29-Nov-1973 | 2.3 KiB | 84 | 36 | |
AudioStream.cpp | H A D | 29-Nov-1973 | 6.5 KiB | 200 | 152 | |
AudioStreamBuilder.cpp | H A D | 29-Nov-1973 | 8.6 KiB | 225 | 157 | |
DataConversionFlowGraph.cpp | H A D | 29-Nov-1973 | 11.6 KiB | 268 | 199 | |
DataConversionFlowGraph.h | H A D | 29-Nov-1973 | 2.9 KiB | 87 | 43 | |
FilterAudioStream.cpp | H A D | 29-Nov-1973 | 4.2 KiB | 107 | 57 | |
FilterAudioStream.h | H A D | 29-Nov-1973 | 7.3 KiB | 224 | 132 | |
FixedBlockAdapter.cpp | H A D | 29-Nov-1973 | 1 KiB | 39 | 18 | |
FixedBlockAdapter.h | H A D | 29-Nov-1973 | 2 KiB | 68 | 25 | |
FixedBlockReader.cpp | H A D | 29-Nov-1973 | 2.4 KiB | 74 | 47 | |
FixedBlockReader.h | H A D | 29-Nov-1973 | 1.9 KiB | 61 | 16 | |
FixedBlockWriter.cpp | H A D | 29-Nov-1973 | 2.4 KiB | 74 | 43 | |
FixedBlockWriter.h | H A D | 29-Nov-1973 | 1.7 KiB | 55 | 14 | |
LatencyTuner.cpp | H A D | 29-Nov-1973 | 3.6 KiB | 109 | 67 | |
MonotonicCounter.h | H A D | 29-Nov-1973 | 3.1 KiB | 113 | 41 | |
OboeDebug.h | H A D | 29-Nov-1973 | 1.3 KiB | 42 | 18 | |
QuirksManager.cpp | H A D | 29-Nov-1973 | 10.2 KiB | 252 | 171 | |
QuirksManager.h | H A D | 29-Nov-1973 | 4.1 KiB | 132 | 60 | |
README.md | H A D | 29-Nov-1973 | 1.3 KiB | 34 | 25 | |
SourceFloatCaller.cpp | H A D | 29-Nov-1973 | 1 KiB | 31 | 12 | |
SourceFloatCaller.h | H A D | 29-Nov-1973 | 1.3 KiB | 45 | 19 | |
SourceI16Caller.cpp | H A D | 29-Nov-1973 | 1.5 KiB | 48 | 25 | |
SourceI16Caller.h | H A D | 29-Nov-1973 | 1.4 KiB | 49 | 23 | |
SourceI24Caller.cpp | H A D | 29-Nov-1973 | 1.8 KiB | 57 | 33 | |
SourceI24Caller.h | H A D | 29-Nov-1973 | 1.5 KiB | 53 | 25 | |
SourceI32Caller.cpp | H A D | 29-Nov-1973 | 1.5 KiB | 48 | 25 | |
SourceI32Caller.h | H A D | 29-Nov-1973 | 1.5 KiB | 53 | 25 | |
StabilizedCallback.cpp | H A D | 29-Nov-1973 | 4.4 KiB | 112 | 53 | |
Trace.cpp | H A D | 29-Nov-1973 | 2.2 KiB | 75 | 43 | |
Trace.h | H A D | 29-Nov-1973 | 870 | 31 | 11 | |
Utilities.cpp | H A D | 29-Nov-1973 | 11.5 KiB | 314 | 262 | |
Version.cpp | H A D | 29-Nov-1973 | 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