Commit 4a49fd31 authored by sbsarac's avatar sbsarac
Browse files

Do HRTF Statistics initialization earlier

parent da0ca533
Loading
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -1226,6 +1226,20 @@ ivas_error ivas_init_decoder(
        }
    }

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    /*-------------------------------------------------------------------*
     * Allocate and initialize HRTF Statistics handle
     *--------------------------------------------------------------------*/

    if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
        if ( ( error = ivas_HRTF_statistics_init( &st_ivas->hHrtfStatistics, output_Fs ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
    /*-----------------------------------------------------------------*
     * Initialize binuaral split rendering
@@ -1945,16 +1959,6 @@ ivas_error ivas_init_decoder(
     * Allocate and initialize rendering handles
     *--------------------------------------------------------------------*/

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
        if ( ( error = ivas_HRTF_statistics_init( &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 )
    {