Commit 75eacfe4 authored by emerit's avatar emerit
Browse files

fix memset

parent cb24b0a2
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ ivas_error ivas_hrtf_init(
        hHrtf->pOut_to_bin_diffuse_im[j] = NULL;
    }

#ifdef FIX_BINARY_BINAURAL_READING
    hHrtf->init_from_rom = 1;
#endif

    return IVAS_ERR_OK;
}

@@ -219,6 +223,9 @@ static ivas_error ivas_rend_initCrend(
    if ( hSetOfHRTF == NULL )
#endif
    {
#ifdef FIX_BINARY_BINAURAL_READING
        hHrtf->init_from_rom = 1;
#endif
        if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED )
        {
            hHrtf->max_num_ir -= 1; /* subtract LFE */
@@ -786,6 +793,10 @@ static ivas_error ivas_rend_initCrend(
    }
    else
    {
#ifdef FIX_BINARY_BINAURAL_READING
        hHrtf->init_from_rom = 0;
#endif

        if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED )
        {
            hHrtf->max_num_ir -= 1; /* subtract LFE */
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@
*******************************************************************************************************/

#include <stdint.h>
#ifdef FIX_BINARY_BINAURAL_READING
#include <string.h>
#endif
#include "options.h"
#include "prot.h"
#include "ivas_prot_rend.h"
+3 −1
Original line number Diff line number Diff line
@@ -1186,7 +1186,9 @@ typedef struct ivas_hrtfs_structure
    float inv_diffuse_weight[MAX_INTERN_CHANNELS]; /* inverse diffuse weights array, access one inverse weight by pInvDiffuseWeight[channel] */
#endif
    float gain_lfe;

#ifdef FIX_BINARY_BINAURAL_READING
    int16_t init_from_rom;
#endif
} HRTFS_DATA, *HRTFS_HANDLE;


+7 −0
Original line number Diff line number Diff line
@@ -837,6 +837,9 @@ static ivas_error create_HRTF_from_rawdata(
        return IVAS_ERR_INTERNAL;
    }

#ifdef FIX_BINARY_BINAURAL_READING
    ( *hHRTF )->init_from_rom = 0;
#endif
    hrtf_data_rptr = hrtf_data;

    /* latency_s */
@@ -1705,7 +1708,11 @@ static ivas_error destroy_HRTF(
{
    uint16_t i, j;

#ifdef FIX_BINARY_BINAURAL_READING
    if ( *hHRTF != NULL && hHRTF != NULL && ( *hHRTF )->init_from_rom == 0 )
#else
    if ( *hHRTF != NULL && hHRTF != NULL )
#endif
    {
        for ( i = 0; i < MAX_INTERN_CHANNELS; i++ )
        {