diff --git a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c index 737231ecffc8d083a4bab7e4aa89f8dcdc815cf7..4a647690d8ce5de2efe2fb8c43a7b4ca5f11491f 100644 --- a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +++ b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c @@ -2019,7 +2019,6 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc if ( samplerate == DEFAULT_SAMPLERATE ) { - fprintf( fp, "\n#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES\n" ); fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/\n" ); } @@ -2040,10 +2039,6 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc write_array_float_to_file( fp, pEner_r, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); - if ( samplerate == LAST_SAMPLERATE ) - { - fprintf( fp, "\n#endif\n" ); - } if ( fp ) fclose( fp ); @@ -2158,7 +2153,6 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\n#ifdef FIX_INV_DIFFUSE_WEIGHT" ); fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); fprintf( fp, "{" ); write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, FORMAT_FLOAT, 0, TAB_WITH_SPACE_OR_NOT ); @@ -2166,11 +2160,6 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int write_array_float_to_file( fp, hrtf->inv_diffuse_weight[1], hrtf->max_num_ir, hrtf->max_num_ir, FORMAT_FLOAT, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}" ); fprintf( fp, ";" ); - fprintf( fp, "\n#else" ); - fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, FORMAT_FLOAT, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";" ); - fprintf( fp, "\n#endif" ); /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ if ( hrtf->pIndex_frequency_max_diffuse[0] == NULL ) @@ -2284,7 +2273,6 @@ void update_h_file_with_reverb( int32_t samplerate ) if ( samplerate == DEFAULT_SAMPLERATE ) { - fprintf( fp, "\n #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES\n" ); fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/\n" ); } @@ -2296,10 +2284,6 @@ void update_h_file_with_reverb( int32_t samplerate ) fprintf( fp, "\nextern float defaultHRIR_left_avg_power_%dkHz[%s];", samplerate / 1000, len_str ); fprintf( fp, "\nextern float defaultHRIR_right_avg_power_%dkHz[%s];", samplerate / 1000, len_str ); - if ( samplerate == LAST_SAMPLERATE ) - { - fprintf( fp, "\n\n#endif\n" ); - } if ( fp ) fclose( fp ); @@ -2393,11 +2377,7 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "\nextern uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\n#ifdef FIX_INV_DIFFUSE_WEIGHT" ); fprintf( fp, "\nextern float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "\n#else" ); - fprintf( fp, "\nextern float %s_%s_inv_diffuse_weight_%2dkHz[%s];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "\n#endif" ); /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ if ( hrtf->pIndex_frequency_max_diffuse[0] == NULL ) {