Commit 6116fa81 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Reverting to call HRTF statistics initialization before any other HRTF initialization calls

parent 84c28927
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -1995,6 +1995,16 @@ ivas_error ivas_init_decoder(
     * Allocate and initialize rendering handles
     *--------------------------------------------------------------------*/

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
        if ( ( error = ivas_hrtf_statistics_open( &st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
#endif

    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {

@@ -2030,11 +2040,6 @@ ivas_error ivas_init_decoder(
        if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
            if ( ( error = ivas_hrtf_statistics_open( &st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            {
                return error;
            }

            if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )