Commit f4842106 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix remaining issues after merge from main.

parent 9c925893
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -109,7 +109,11 @@ ivas_error ivas_mcmasa_dec_reconfig(
    if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) )
    {
        /* open parametric binaural renderer */
#ifdef HRTF_BINARY_FILE
        if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
@@ -128,7 +132,11 @@ ivas_error ivas_mcmasa_dec_reconfig(
            {
                /* st_ivas->hDiracDecBin->useTdDecorr will change => close and re-open. */
                ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );
#ifdef HRTF_BINARY_FILE
                if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#else
                if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
+8 −0
Original line number Diff line number Diff line
@@ -1055,7 +1055,11 @@ static ivas_error ivas_mc_dec_reconfig(
                    /* useTdDecorr may change => close and re-open */
                    ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

#ifdef HRTF_BINARY_FILE
                    if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK )
#endif
                    {
                        return error;
                    }
@@ -1072,7 +1076,11 @@ static ivas_error ivas_mc_dec_reconfig(
            }
            else if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) )
            {
#ifdef HRTF_BINARY_FILE
                if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#else
                if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
+7 −7
Original line number Diff line number Diff line
@@ -873,15 +873,15 @@ static ivas_error destroy_HRTF(
            {
                if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL )
                {
                    count_free( ( *hHRTF )->pIndex_frequency_max[i][j] );
                    free( ( *hHRTF )->pIndex_frequency_max[i][j] );
                }
                if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL )
                {
                    count_free( ( *hHRTF )->pOut_to_bin_re[i][j] );
                    free( ( *hHRTF )->pOut_to_bin_re[i][j] );
                }
                if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL )
                {
                    count_free( ( *hHRTF )->pOut_to_bin_im[i][j] );
                    free( ( *hHRTF )->pOut_to_bin_im[i][j] );
                }
            }
        }
@@ -889,19 +889,19 @@ static ivas_error destroy_HRTF(
        {
            if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL )
            {
                count_free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] );
                free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] );
            }
            if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL )
            {
                count_free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] );
                free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] );
            }
            if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL )
            {
                count_free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] );
                free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] );
            }
        }

        count_free( *hHRTF );
        free( *hHRTF );
        *hHRTF = NULL;
    }

+6 −6
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ ivas_error ivas_HRTF_CRend_binary_open(
    HRTFS_CREND **hSetOfHRTF )
{
    /* Allocate HR filter set for headphones configuration */
    *hSetOfHRTF = (HRTFS_CREND *) count_malloc( sizeof( HRTFS_CREND ) );
    *hSetOfHRTF = (HRTFS_CREND *) malloc( sizeof( HRTFS_CREND ) );
    if ( *hSetOfHRTF == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for set of HRTF binary!" );
@@ -300,7 +300,7 @@ void ivas_HRTF_CRend_binary_close(

    destroy_SetOfHRTF( *hSetOfHRTF );

    count_free( *hSetOfHRTF );
    free( *hSetOfHRTF );
    *hSetOfHRTF = NULL;

    return;
@@ -317,7 +317,7 @@ void ivas_HRTF_CRend_binary_close(
ivas_error ivas_HRTF_fastconv_binary_open(
    HRTFS_FASTCONV **hHrtfFastConv )
{
    *hHrtfFastConv = (HRTFS_FASTCONV *) count_malloc( sizeof( HRTFS_FASTCONV ) );
    *hHrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) );
    if ( *hHrtfFastConv == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FASTCONV HRTF tables!" );
@@ -340,7 +340,7 @@ void ivas_HRTF_fastconv_binary_close(
        return;
    }

    count_free( *hHrtfFastConv );
    free( *hHrtfFastConv );
    *hHrtfFastConv = NULL;

    return;
@@ -357,7 +357,7 @@ void ivas_HRTF_fastconv_binary_close(
ivas_error ivas_HRTF_parambin_binary_open(
    HRTFS_PARAMBIN **hHrtfParambin )
{
    *hHrtfParambin = (HRTFS_PARAMBIN *) count_malloc( sizeof( HRTFS_PARAMBIN ) );
    *hHrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) );
    if ( *hHrtfParambin == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for parametric binauralizer HRTF tables!" );
@@ -380,7 +380,7 @@ void ivas_HRTF_parambin_binary_close(
        return;
    }

    count_free( *hHrtfParambin );
    free( *hHrtfParambin );
    *hHrtfParambin = NULL;

    return;