Commit 184af2d3 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] update setting of binaural_latency_ns value according to input format

parent 9fe170dd
Loading
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1019,7 +1019,27 @@ ivas_error ivas_rend_openCldfbRend(
    }

#ifdef FIX_1113_CLDFB_REND_IN_ISAR
#ifdef FIX_1113_EXTREND_ISAR
    if ( inConfig == IVAS_AUDIO_CONFIG_FOA )
    {
        pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_FOA_latency_s * 1000000000.f );
    }
    else if ( inConfig == IVAS_AUDIO_CONFIG_HOA2 )
    {
        pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_HOA2_latency_s * 1000000000.f );
    }
    else if ( inConfig == IVAS_AUDIO_CONFIG_HOA3 )
    {
        pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f );
    }
    else
    {
        /* should never happen for SBA */
        return IVAS_ERR_INVALID_OUTPUT_FORMAT;
    }
#else
    pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f );
#endif
#else
    pCldfbRend->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f );
#endif