Commit a82c25a4 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] number of samples rendered not correctly updated in IVAS_DEC_GetSplitBinaural()

parent 478cacfb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1146,7 +1146,7 @@ ivas_error IVAS_DEC_GetSplitBinaural(
    *nOutSamples = 0;
    *needNewFrame = FALSE;

    while ( error == IVAS_ERR_OK && !*needNewFrame )
    while ( error == IVAS_ERR_OK && !*needNewFrame /*TODO(jbm): && numOutSamples < numAskedSamples */ )
    {
        int16_t nOutSamplesLocal;
        IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend;
@@ -1165,7 +1165,7 @@ ivas_error IVAS_DEC_GetSplitBinaural(
            output_int,
            &nOutSamplesLocal,
            needNewFrame );
        if ( error != IVAS_ERR_OK || *needNewFrame )
        if ( error != IVAS_ERR_OK )
        {
            return error;
        }
@@ -1186,6 +1186,7 @@ ivas_error IVAS_DEC_GetSplitBinaural(
        max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 );
        pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;

        /* TODO(jbm): need to wait 20ms before writing split bitstream in 5ms mode */
        error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend,
                                                    st_ivas->hHeadTrackData->Quaternion,
                                                    st_ivas->hRenderConfig->split_rend_config.splitRendBitRate,