Name Date Size #Lines LOC

..--

AdpfWrapper.cppH A D25-Apr-20254.3 KiB12585

AdpfWrapper.hH A D25-Apr-20252.5 KiB8633

AudioClock.hH A D25-Apr-20252.4 KiB7634

AudioSourceCaller.cppH A D25-Apr-20251.5 KiB3919

AudioSourceCaller.hH A D25-Apr-20252.3 KiB8436

AudioStream.cppH A D25-Apr-20257.6 KiB223164

AudioStreamBuilder.cppH A D25-Apr-20259 KiB231162

DataConversionFlowGraph.cppH A D25-Apr-202511.7 KiB267198

DataConversionFlowGraph.hH A D25-Apr-20252.9 KiB8743

FilterAudioStream.cppH A D25-Apr-20254.2 KiB10757

FilterAudioStream.hH A D25-Apr-20257.6 KiB228136

FixedBlockAdapter.cppH A D25-Apr-20251 KiB3918

FixedBlockAdapter.hH A D25-Apr-20252 KiB6825

FixedBlockReader.cppH A D25-Apr-20252.4 KiB7447

FixedBlockReader.hH A D25-Apr-20251.9 KiB6116

FixedBlockWriter.cppH A D25-Apr-20252.4 KiB7443

FixedBlockWriter.hH A D25-Apr-20251.7 KiB5514

LatencyTuner.cppH A D25-Apr-20253.6 KiB10967

MonotonicCounter.hH A D25-Apr-20253.1 KiB11341

OboeDebug.hH A D25-Apr-20251.3 KiB4218

OboeExtensions.cppH A D25-Apr-20251.2 KiB3715

QuirksManager.cppH A D25-Apr-202512.4 KiB312217

QuirksManager.hH A D25-Apr-20254.2 KiB13561

README.mdH A D25-Apr-20251.3 KiB3425

SourceFloatCaller.cppH A D25-Apr-20251 KiB3112

SourceFloatCaller.hH A D25-Apr-20251.3 KiB4519

SourceI16Caller.cppH A D25-Apr-20251.5 KiB4825

SourceI16Caller.hH A D25-Apr-20251.5 KiB5024

SourceI24Caller.cppH A D25-Apr-20251.8 KiB5733

SourceI24Caller.hH A D25-Apr-20251.6 KiB5426

SourceI32Caller.cppH A D25-Apr-20251.5 KiB4825

SourceI32Caller.hH A D25-Apr-20251.5 KiB5426

StabilizedCallback.cppH A D25-Apr-20254.4 KiB11353

Trace.cppH A D25-Apr-20252.2 KiB7643

Trace.hH A D25-Apr-2025871 3211

Utilities.cppH A D25-Apr-202512.9 KiB348288

Version.cppH A D25-Apr-20251,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