Commit 816ea773 authored by vaclav's avatar vaclav
Browse files

harmonize calling of ivas_td_binaural_close()

parent 28eafb0b
Loading
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2699,11 +2699,9 @@ void ivas_destroy_dec(
    ivas_combined_orientation_close( &st_ivas->hCombinedOrientationData );

    /* Time Domain binaural renderer handle */
    if ( st_ivas->hBinRendererTd != NULL )
    {
    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
    }
    else if ( st_ivas->hHrtfTD != NULL )

    if ( st_ivas->hHrtfTD != NULL )
    {
        BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval );

+2 −9
Original line number Diff line number Diff line
@@ -271,16 +271,9 @@ static ivas_error ivas_ism_bitrate_switching_dec(

            /* Close the TD Binaural renderer */
            if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
            {
                if ( st_ivas->hBinRendererTd != NULL )
            {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }

                if ( st_ivas->hHrtfTD != NULL )
                {
                st_ivas->hHrtfTD = NULL;
                }

                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
+2 −9
Original line number Diff line number Diff line
@@ -337,15 +337,8 @@ ivas_error ivas_omasa_dec_config(
            else
            {
                /* TD renderer handle */
                if ( st_ivas->hBinRendererTd != NULL )
                {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }

                if ( st_ivas->hHrtfTD != NULL ) // ToDo: this is copied from ivas_ism_bitrate_switching() but a review is needed
                {
                st_ivas->hHrtfTD = NULL;
                }

                /* ISM renderer handle + ISM data handle */
                ivas_omasa_separate_object_renderer_close( st_ivas );
+1 −4
Original line number Diff line number Diff line
@@ -564,12 +564,9 @@ ivas_error ivas_sba_dec_reconfigure(
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    if ( st_ivas->hHrtfTD != NULL )
                    {
                    st_ivas->hHrtfTD = NULL;
                }
            }
            }
            nchan_transport_old += st_ivas->nchan_ism;
            st_ivas->ism_mode = ISM_MODE_NONE;
        }