Commit 4ecd879a authored by vaclav's avatar vaclav
Browse files

issue 1153: Replace debugging constant FRAMES_PER_SECOND by FRAMES_PER_SEC +...

issue 1153: Replace debugging constant FRAMES_PER_SECOND by FRAMES_PER_SEC + define constants in library instead of in API; under FIX_1153_ISAR_CONSTS
parent d6e5b4e5
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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
+6 −0
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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 ################################## */

+8 −0
Original line number Diff line number Diff line
@@ -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 )
        {