Commit 2ba80d32 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] delay compensation when delay is greater than 5ms and fixes for split-pre rendering

parent 89945ee4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1907,7 +1907,11 @@ int main(
        if ( audioWriter != NULL )
        {
#endif
#ifdef API_5MS
            if ( ( delayNumSamples * num_out_channels ) < outBufferSize ) /* TODO tmu2sgi : needs verification */
#else
        if ( delayNumSamples < outBufferSize )
#endif
            {
                if ( AudioFileWriter_write( audioWriter, &outInt16Buffer[delayNumSamples * num_out_channels], outBufferSize - ( delayNumSamples * num_out_channels ) ) != IVAS_ERR_OK )
                {
+4 −0
Original line number Diff line number Diff line
@@ -4766,6 +4766,8 @@ ivas_error IVAS_REND_FeedInputAudio(

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL &&
         hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
         hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
         ( inputAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut )
#else
    if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL &&
@@ -9045,6 +9047,8 @@ ivas_error IVAS_REND_GetSamples(

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL &&
         hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
         hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
         ( outAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut )
#else
    if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL &&
+1 −2
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ SPLIT_PRE_REND_CMD = [
    "BINAURAL_SPLIT_CODED",
    "-tf",
    "",  # 14 -> post-trajectory file
    "-fr5",
]

""" Split-post Renderer commandline template """
@@ -190,5 +189,5 @@ SPLIT_POST_REND_CMD = [
    "BINAURAL",
    "-tf",
    "",  # 12 -> post-trajectory file
    "-fr5",
    "-fr5", # split decoding must be on 5ms granularity
]