[split-non-BE] Proper flush in SR
- Related issues: #1342
- Requested reviewers: @sagnowski
Reason why this change is needed
The function IVAS_DEC_Flush is applicable only when the decoder outputs to an audio-only output config. There is no corresponding functionality for flushing to an ISAR bitstream/metadata struct (ISAR_SPLIT_REND_BITS_DATA). The temporary fix TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR limited the number of flushed channels to BINAURAL_CHANNELS but in case of SR, the total number of channels is nchan_out_syn_output = BINAURAL_CHANNELS * st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses . Thus, the additional channel corresponding to the probed head poses are not flushed.
Description of the change
Render and flush the remaining buffered audio into the SR ring buffers using the correctly-sized internal float buffer to avoid writing beyond the end of the pcmBuf. Metadata generation is handled during normal decoding process.
Affected operating points
Affects only SR mode with BINAURAL_SPLIT_PCM output formats in JBM processing.