diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 16614a929aac45f348d23167a627eadb570bf3d7..55d3450c3dda6cee5d72c410183b64340ab26820 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -57,11 +57,13 @@ #define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4 #define IVAS_ROOM_ABS_COEFF 6 +#ifndef FIX_1153_ISAR_CONSTS /* Maximum buffer length (per channel) in samples */ #define MAX_BUFFER_LENGTH_PER_CHANNEL ( L_FRAME48k ) /* Frame size required when rendering to binaural */ #define BINAURAL_RENDERING_FRAME_SIZE_MS 5 +#endif /*----------------------------------------------------------------------------------* * Common API enum for output audio configurations diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 786a6d436b0665309802221619a0be173a179bb9..c6a3ff8a6a249ff8b2e005f1cc697c13487f73a7 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -177,6 +177,12 @@ typedef enum #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) +#ifdef FIX_1153_ISAR_CONSTS +#define MAX_BUFFER_LENGTH_PER_CHANNEL L_FRAME48k /* Maximum buffer length (per channel) in samples */ + +#define BINAURAL_RENDERING_FRAME_SIZE_MS 5 /* Frame size required when rendering to binaural */ +#endif + typedef enum { TC_BUFFER_MODE_RENDERER, diff --git a/lib_com/options.h b/lib_com/options.h index 484de232aa48b1865b46fd4fea0e4eb7f0a5a0fb..48e0c33c4941cf27cbdcd6563a401334f03a67cf 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,7 +163,7 @@ #define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM /* VA: issue 1226: for FastConv binaural renderer in decoder, load only HTRT coefficient set that is needed */ #define FIX_1227_Crend_HRTF_LOADING_OPTIM /* VA: issue 1227: for Crend binaural renderer in decoder, load only HTRT coefficient set that is needed */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ - +#define FIX_1153_ISAR_CONSTS /* VA: issue 1153: Replace debugging constant FRAMES_PER_SECOND by FRAMES_PER_SEC + define constants in library instead of in API */ /* #################### End BE switches ################################## */ diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index 4cd4855ecc63d46c08c3e1c94f76562f85b45eeb..b81123e17cc22a1b21ccaa119e2e7ca460c159ac 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -1776,7 +1776,11 @@ ivas_error split_renderer_open_lc3plus( /* Alocate buffers for delay compensation */ if ( pSplitRendConfig->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) { +#ifdef FIX_1153_ISAR_CONSTS + delayBufferLength = (int16_t) ( output_Fs / (int32_t) FRAMES_PER_SEC + hSplitRendWrapper->lc3plusDelaySamples ); +#else delayBufferLength = (int16_t) ( output_Fs / (int32_t) FRAMES_PER_SECOND + hSplitRendWrapper->lc3plusDelaySamples ); +#endif for ( i = 0; i < hSplitRendWrapper->multiBinPoseData.num_poses * BINAURAL_CHANNELS; ++i ) { if ( ( hSplitRendWrapper->lc3plusDelayBuffers[i] = malloc( delayBufferLength * sizeof( float ) ) ) == NULL ) @@ -1905,7 +1909,11 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( if ( useLc3plus ) { /*this should always have the time resolution of pose correction MD. Note that this does not change frame size of LC3plus*/ +#ifdef FIX_1153_ISAR_CONSTS + int16_t frame_size = (int16_t) ( hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SEC ); +#else int16_t frame_size = (int16_t) ( hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SECOND ); +#endif for ( i = 0; i < num_poses * BINAURAL_CHANNELS; ++i ) {