Commit 5954ba4e authored by emerit's avatar emerit
Browse files

bugs fix

parent c9d0da04
Loading
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -514,7 +514,11 @@ int main(

    if ( arg.hrtfReaderEnabled )
    {
#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL;
#else
        IVAS_DEC_HRTF_HANDLE hHrtfTD;
#endif

        IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD );

@@ -525,7 +529,11 @@ int main(
        }


#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL;
#else
        IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF;
#endif
        IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF );

        if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
@@ -533,14 +541,22 @@ int main(
            fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName );
            goto cleanup;
        }
#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv = NULL;
#else
        IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv;
#endif
        IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv );

        if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName );
        }
#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin = NULL;
#else
        IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin;
#endif
        IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin );

        if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK )
@@ -611,10 +627,18 @@ cleanup:

    if ( arg.hrtfReaderEnabled )
    {
#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL;
#else
        IVAS_DEC_HRTF_HANDLE hHrtfTD;
#endif
        IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD );
        dealloc_HRTF_binary( hHrtfTD );
#ifdef UPDATE_SBA_FILTER
        IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL;
#else
        IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF;
#endif
        IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF );
        destroy_SetOfHRTF( hSetOfHRTF );
    }
+3 −0
Original line number Diff line number Diff line
@@ -1512,6 +1512,7 @@ int16_t get_crend_hrtf_tables( RENDERER_TYPE rend_type, BINAURAL_INPUT_AUDIO_CON
                hrtf_table_dims_out.max_num_iterations = CRendBin_HOA2_HRIR_max_num_iterations_16kHz;
                result = 0;
            }
            hrtf_table_dims_out.max_num_ir = 9;
        }
        else if ( input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_FOA )
        {
@@ -1547,6 +1548,7 @@ int16_t get_crend_hrtf_tables( RENDERER_TYPE rend_type, BINAURAL_INPUT_AUDIO_CON
                hrtf_table_ptrs_out.coeff_diffuse_im = (float *) ( &CRendBin_FOA_HRIR_coeff_diffuse_im_32kHz );

                hrtf_table_dims_out.max_num_iterations = CRendBin_FOA_HRIR_max_num_iterations_32kHz;
                result = 0;
            }
            else if ( frequency == 16000 )
            {
@@ -1565,6 +1567,7 @@ int16_t get_crend_hrtf_tables( RENDERER_TYPE rend_type, BINAURAL_INPUT_AUDIO_CON
                hrtf_table_dims_out.max_num_iterations = CRendBin_FOA_HRIR_max_num_iterations_16kHz;
                result = 0;
            }
            hrtf_table_dims_out.max_num_ir = 4;
        }
#endif
    }