[rend-non-BE][split-non-BE] Resolve "Delay alignment in external renderer" and "External renderer crashes when rendering OMASA"
- Related issues: #1245 (closed), #1334 (closed)
- Requested reviewers: @tyagiri, @pihlajakuja
Reason why this change is needed
- Delay alignment of multiple inputs in the external renderer is not performed.
Description of the change
- A new delay buffer has been added to
input_base
which is a ring buffer to store input samples - New methods
setInputDelayXXX
added per input format to compute the delay based on the initialised renderers for the given inputs. - Reworked
IVAS_REND_GetDelay()
with internal functions (API unchanged) -
IVAS_Rend_AddInput()
now updates the global renderer delay in the handle, used for delay alignment later -
IVAS_Rend_FeedInputAudio()
performs delay alignment via input buffering:- The global maximum delay is retrieved from the renderer handle (at this point all inputs would have been added)
- If needed, zeros are first pushed into the delay buffer to delay the input to align it with the input that induces the maximum global delay
- During subsequent processing new samples are pushed into the delay buffer and a frame of samples is retrieved with any delay if present
- ISM Metadata Delay is now also updated based on the input delay
- Since the delay buffers may contain delayed input samples, additional calls to
IVAS_Rend_FeedInputAudio()
andgetSamples()
are expected after the input file reading is finished to "flush" them. - A reworked fix of !2148 (closed) has been added, existing CLDFB analysis handles are used to convert ISM to CLDFB domain for OMASA or OSBA w/ FastConv split-pre-rendering
- Refactored
getSamplesInternal()
andIVAS_REND_GetSamples()
/IVAS_REND_GetSplitBinauralBitstream()
to be less interdependent. - Various cleanup/renaming and comment updates. See commit history and comments on MR for further details.
Affected operating points
- External renderer for multiple inputs
- External renderer as split-pre renderer
- Any configuration where multiple domains/renderers are employed with differing delays
Related to #1245 (closed)
Edited by Archit Tamarapu