Commit 66a4d942 authored by stoutjesdijk's avatar stoutjesdijk 🎧
Browse files

fix test cases tripping over nonexistant roomAcoustics

parent 48dc0fbd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@
#define FIX_ITD_CNG                                     /* Eri Contribution 11: Fix for CNG ITD */
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */
#define FIX_ISM_INACTIVE_BITS                           /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */
#define FIX_RA_PARAMS_PARAM_BIN_REND                    /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/



+22 −1
Original line number Diff line number Diff line
@@ -482,6 +482,27 @@ ivas_error ivas_binaural_reverb_open(
        }
    }

#ifdef FIX_RA_PARAMS_PARAM_BIN_REND
    if ( ( roomAcoustics ) && ( roomAcoustics->override ) )
    {
        ivas_reverb_prepare_cldfb_params( roomAcoustics, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene );
        ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene );
        ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) );
    }
    else
    {
        if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
        {
            ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, fastconvReverberationTimes, fastconvReverberationEneCorrections );
            ivas_binaural_reverb_setPreDelay( hReverb, 10 );
        }
        else
        {
            ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, parametricReverberationTimes, parametricReverberationEneCorrections );
            ivas_binaural_reverb_setPreDelay( hReverb, 10 );
        }
    }
#else
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
        if ( !roomAcoustics->override )
@@ -501,7 +522,7 @@ ivas_error ivas_binaural_reverb_open(
        ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, parametricReverberationTimes, parametricReverberationEneCorrections );
        ivas_binaural_reverb_setPreDelay( hReverb, 10 );
    }

#endif
    return IVAS_ERR_OK;
}