You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
swurl 6c655321e6
Move dead submodules in-tree
10 months ago
..
AdpfWrapper.cpp Move dead submodules in-tree 10 months ago
AdpfWrapper.h Move dead submodules in-tree 10 months ago
AudioSourceCaller.cpp Move dead submodules in-tree 10 months ago
AudioSourceCaller.h Move dead submodules in-tree 10 months ago
AudioStream.cpp Move dead submodules in-tree 10 months ago
AudioStreamBuilder.cpp Move dead submodules in-tree 10 months ago
DataConversionFlowGraph.cpp Move dead submodules in-tree 10 months ago
DataConversionFlowGraph.h Move dead submodules in-tree 10 months ago
FilterAudioStream.cpp Move dead submodules in-tree 10 months ago
FilterAudioStream.h Move dead submodules in-tree 10 months ago
FixedBlockAdapter.cpp Move dead submodules in-tree 10 months ago
FixedBlockAdapter.h Move dead submodules in-tree 10 months ago
FixedBlockReader.cpp Move dead submodules in-tree 10 months ago
FixedBlockReader.h Move dead submodules in-tree 10 months ago
FixedBlockWriter.cpp Move dead submodules in-tree 10 months ago
FixedBlockWriter.h Move dead submodules in-tree 10 months ago
LatencyTuner.cpp Move dead submodules in-tree 10 months ago
MonotonicCounter.h Move dead submodules in-tree 10 months ago
OboeDebug.h Move dead submodules in-tree 10 months ago
OboeExtensions.cpp Move dead submodules in-tree 10 months ago
QuirksManager.cpp Move dead submodules in-tree 10 months ago
QuirksManager.h Move dead submodules in-tree 10 months ago
README.md Move dead submodules in-tree 10 months ago
SourceFloatCaller.cpp Move dead submodules in-tree 10 months ago
SourceFloatCaller.h Move dead submodules in-tree 10 months ago
SourceI16Caller.cpp Move dead submodules in-tree 10 months ago
SourceI16Caller.h Move dead submodules in-tree 10 months ago
SourceI24Caller.cpp Move dead submodules in-tree 10 months ago
SourceI24Caller.h Move dead submodules in-tree 10 months ago
SourceI32Caller.cpp Move dead submodules in-tree 10 months ago
SourceI32Caller.h Move dead submodules in-tree 10 months ago
StabilizedCallback.cpp Move dead submodules in-tree 10 months ago
Trace.cpp Move dead submodules in-tree 10 months ago
Trace.h Move dead submodules in-tree 10 months ago
Utilities.cpp Move dead submodules in-tree 10 months ago
Version.cpp Move dead submodules in-tree 10 months ago

README.md

Notes on Implementation

Latency from Resampling

There are two components of the latency. The resampler itself, and a buffer that is used to adapt the block sizes.

  1. The resampler is an FIR running at the target sample rate. So its latency is the number of taps. From MultiChannelResampler.cpp, numTaps is

    Fastest: 2 Low: 4 Medium: 8 High: 16 Best: 32

For output, the device sampling rate is used, which is typically 48000.For input, the app sampling rate is used.

  1. There is a block size adapter that collects odd sized blocks into larger blocks of the correct size.

The adapter contains one burst of frames, from getFramesPerBurst(). But if the app specifies a particular size using setFramesPerCallback() then that size will be used. Here is some pseudo-code to calculate the latency.

latencyMillis = 0
targetRate = isOutput ? deviceRate : applicationRate
// Add latency from FIR
latencyMillis += numTaps * 1000.0 / targetRate
// Add latency from block size adaptation
adapterSize = (callbackSize > 0) ? callbackSize : burstSize
if (isOutput && isCallbackUsed) latencyMillis += adapterSize * 1000.0 / deviceRate
else if (isInput && isCallbackUsed) latencyMillis += adapterSize * 1000.0 / applicationRate
else if (isInput && !isCallbackUsed) latencyMillis += adapterSize * 1000.0 / deviceRate