Loading lib_util/hrtf_file_reader.c +24 −2 Original line number Diff line number Diff line Loading @@ -1155,6 +1155,7 @@ static ivas_error load_reverb_from_binary( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } } Loading Loading @@ -1319,11 +1320,17 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "HRTF binary file not compliant (number of HRTF)" ); } if ( ( header_check_result = check_hrtf_binary_header( &hrtf_header ) ) != IVAS_ERR_OK ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return header_check_result; } Loading @@ -1332,6 +1339,9 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); } } Loading @@ -1340,6 +1350,7 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } } Loading Loading @@ -2902,6 +2913,7 @@ ivas_error load_fastconv_HRTF_from_binary( { if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } #else Loading Loading @@ -3095,6 +3107,7 @@ ivas_error load_parambin_HRTF_from_binary( #ifdef FIX_CREND_SIMPLIFY_CODE if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } #endif Loading Loading @@ -3158,6 +3171,7 @@ ivas_error load_Crend_HRTF_from_binary( ivas_hrtfs_file_header_t hrtfs_file_header; int16_t hrtf_id; bool load = false; int16_t asCrend = 0; BINAURAL_INPUT_AUDIO_CONFIG hrtf_set_binaural_cfg; /* convert audio config. to HRTF binaural config */ Loading Loading @@ -3218,6 +3232,7 @@ ivas_error load_Crend_HRTF_from_binary( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } Loading @@ -3232,7 +3247,7 @@ ivas_error load_Crend_HRTF_from_binary( free( hrtf_data ); return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); } asCrend = 1; break; /* read just one set */ } else Loading @@ -3243,8 +3258,15 @@ ivas_error load_Crend_HRTF_from_binary( free( hrtf_data ); if ( asCrend ) { return IVAS_ERR_OK; } else { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); } } #else /*---------------------------------------------------------------------* Loading Loading
lib_util/hrtf_file_reader.c +24 −2 Original line number Diff line number Diff line Loading @@ -1155,6 +1155,7 @@ static ivas_error load_reverb_from_binary( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } } Loading Loading @@ -1319,11 +1320,17 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "HRTF binary file not compliant (number of HRTF)" ); } if ( ( header_check_result = check_hrtf_binary_header( &hrtf_header ) ) != IVAS_ERR_OK ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return header_check_result; } Loading @@ -1332,6 +1339,9 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) { #ifdef FIX_989_TD_REND_ROM free( hrtf_data ); #endif return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); } } Loading @@ -1340,6 +1350,7 @@ static ivas_error TDREND_MIX_LoadHRTF( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } } Loading Loading @@ -2902,6 +2913,7 @@ ivas_error load_fastconv_HRTF_from_binary( { if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } #else Loading Loading @@ -3095,6 +3107,7 @@ ivas_error load_parambin_HRTF_from_binary( #ifdef FIX_CREND_SIMPLIFY_CODE if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } #endif Loading Loading @@ -3158,6 +3171,7 @@ ivas_error load_Crend_HRTF_from_binary( ivas_hrtfs_file_header_t hrtfs_file_header; int16_t hrtf_id; bool load = false; int16_t asCrend = 0; BINAURAL_INPUT_AUDIO_CONFIG hrtf_set_binaural_cfg; /* convert audio config. to HRTF binaural config */ Loading Loading @@ -3218,6 +3232,7 @@ ivas_error load_Crend_HRTF_from_binary( { if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; } Loading @@ -3232,7 +3247,7 @@ ivas_error load_Crend_HRTF_from_binary( free( hrtf_data ); return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); } asCrend = 1; break; /* read just one set */ } else Loading @@ -3243,8 +3258,15 @@ ivas_error load_Crend_HRTF_from_binary( free( hrtf_data ); if ( asCrend ) { return IVAS_ERR_OK; } else { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); } } #else /*---------------------------------------------------------------------* Loading