• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

AudioClock.hH A D29-Nov-19732.4 KiB7634

AudioSourceCaller.cppH A D29-Nov-19731.5 KiB3919

AudioSourceCaller.hH A D29-Nov-19732.3 KiB8436

AudioStream.cppH A D29-Nov-19736.5 KiB200152

AudioStreamBuilder.cppH A D29-Nov-19738.6 KiB225157

DataConversionFlowGraph.cppH A D29-Nov-197311.6 KiB268199

DataConversionFlowGraph.hH A D29-Nov-19732.9 KiB8743

FilterAudioStream.cppH A D29-Nov-19734.2 KiB10757

FilterAudioStream.hH A D29-Nov-19737.3 KiB224132

FixedBlockAdapter.cppH A D29-Nov-19731 KiB3918

FixedBlockAdapter.hH A D29-Nov-19732 KiB6825

FixedBlockReader.cppH A D29-Nov-19732.4 KiB7447

FixedBlockReader.hH A D29-Nov-19731.9 KiB6116

FixedBlockWriter.cppH A D29-Nov-19732.4 KiB7443

FixedBlockWriter.hH A D29-Nov-19731.7 KiB5514

LatencyTuner.cppH A D29-Nov-19733.6 KiB10967

MonotonicCounter.hH A D29-Nov-19733.1 KiB11341

OboeDebug.hH A D29-Nov-19731.3 KiB4218

QuirksManager.cppH A D29-Nov-197310.2 KiB252171

QuirksManager.hH A D29-Nov-19734.1 KiB13260

README.mdH A D29-Nov-19731.3 KiB3425

SourceFloatCaller.cppH A D29-Nov-19731 KiB3112

SourceFloatCaller.hH A D29-Nov-19731.3 KiB4519

SourceI16Caller.cppH A D29-Nov-19731.5 KiB4825

SourceI16Caller.hH A D29-Nov-19731.4 KiB4923

SourceI24Caller.cppH A D29-Nov-19731.8 KiB5733

SourceI24Caller.hH A D29-Nov-19731.5 KiB5325

SourceI32Caller.cppH A D29-Nov-19731.5 KiB4825

SourceI32Caller.hH A D29-Nov-19731.5 KiB5325

StabilizedCallback.cppH A D29-Nov-19734.4 KiB11253

Trace.cppH A D29-Nov-19732.2 KiB7543

Trace.hH A D29-Nov-1973870 3111

Utilities.cppH A D29-Nov-197311.5 KiB314262

Version.cppH A D29-Nov-19731,014 297

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