From eac4b48981abb49890961b9c362f442fdd9968ba Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 19 Aug 2025 09:01:01 +0200 Subject: [PATCH] Port NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND to enable configurable distAtt in renderer --- apps/renderer.c | 13 ++++++++++++- lib_com/options.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/renderer.c b/apps/renderer.c index cd0e99170..59dbb7571 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1081,7 +1081,18 @@ int main( fprintf( stderr, "\nFailed to read renderer configuration from file %s\n", args.renderConfigFilePath ); goto cleanup; } - +#ifdef NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND + if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, args.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", args.directivityPatternId[0], args.directivityPatternId[1], args.directivityPatternId[2], args.directivityPatternId[3] ); + goto cleanup; + } + if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Failed to get Distance Attenuation \n\n" ); + goto cleanup; + } +#endif if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #ifdef FIX_1053_REVERB_RECONFIGURATION diff --git a/lib_com/options.h b/lib_com/options.h index 9bf81d6e7..5813f5f37 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -203,6 +203,7 @@ #define NONBE_1131_ACELP_OOB /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */ #define NONBE_1240_FIX_CORE_SELECTION_ISM_SW /* VA: issue 1240: Remove the forcing of the TCX core in ISM when switching from a high bitarte to a low one */ #define FIX_1101_CLEANING_JBM_CALL /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */ +#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */ /* #################### End BASOP porting switches ############################ */ -- GitLab