Commit 68dca016 authored by vaclav's avatar vaclav
Browse files

address issue 743: RENDER_CONFIG_HANDLE defined twice

parent 0dfdd419
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -721,7 +721,7 @@ int main(

        if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK )
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK )
            {
                if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK )
                {
@@ -734,7 +734,7 @@ int main(
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId );
                goto cleanup;
            }
            renderConfig.room_acoustics.override = true;
            renderConfig.roomAcoustics.override = true;
        }

        if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK )
@@ -743,6 +743,7 @@ int main(
            goto cleanup;
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Load custom loudspeaker layout data
     *------------------------------------------------------------------------------------------*/
+2 −2
Original line number Diff line number Diff line
@@ -1078,7 +1078,7 @@ int main(

        if ( args.outConfig.audioConfig == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK )
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK )
            {
                if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK )
                {
@@ -1091,7 +1091,7 @@ int main(
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", args.acousticEnvironmentId );
                exit( -1 );
            }
            renderConfig.room_acoustics.override = 1;
            renderConfig.roomAcoustics.override = 1;
        }

        if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK )
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ typedef struct _IVAS_RENDER_CONFIG
#ifdef DEBUGGING
    IVAS_RENDER_TYPE_OVERRIDE renderer_type_override;
#endif
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA room_acoustics;
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA roomAcoustics;
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_SPLIT_REND_CONFIG_DATA split_rend_config;
#endif
+23 −23
Original line number Diff line number Diff line
@@ -2056,14 +2056,14 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN
            break;
    }
#endif
    hRCout->room_acoustics.override = hRCin->roomAcoustics.override;
    hRCout->room_acoustics.nBands = hRCin->roomAcoustics.nBands;
    hRCout->room_acoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay;
    hRCout->room_acoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay;

    mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );
    hRCout->roomAcoustics.override = hRCin->roomAcoustics.override;
    hRCout->roomAcoustics.nBands = hRCin->roomAcoustics.nBands;
    hRCout->roomAcoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay;
    hRCout->roomAcoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay;

    mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS );
#ifdef SPLIT_REND_WITH_HEAD_ROT
    hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k;
@@ -2075,8 +2075,8 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN
    hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB;
    hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection;
#endif
    hRCout->room_acoustics.use_er = hRCin->roomAcoustics.use_er;
    hRCout->room_acoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity;
    hRCout->roomAcoustics.use_er = hRCin->roomAcoustics.use_er;
    hRCout->roomAcoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity;

    return IVAS_ERR_OK;
}
@@ -2200,25 +2200,25 @@ ivas_error IVAS_DEC_FeedRenderConfig(
        hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_CREND;
    }
#endif
    hRenderConfig->roomAcoustics.override = renderConfig.room_acoustics.override;
    hRenderConfig->roomAcoustics.nBands = renderConfig.room_acoustics.nBands;
    hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.room_acoustics.acousticPreDelay;
    hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.room_acoustics.inputPreDelay;
    hRenderConfig->roomAcoustics.override = renderConfig.roomAcoustics.override;
    hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands;
    hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay;
    hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay;

    hRenderConfig->roomAcoustics.use_er = 0;
    if ( renderConfig.room_acoustics.use_er == 1 )
    if ( renderConfig.roomAcoustics.use_er == 1 )
    {
        hRenderConfig->roomAcoustics.use_er = renderConfig.room_acoustics.use_er;
        hRenderConfig->roomAcoustics.lowComplexity = renderConfig.room_acoustics.lowComplexity;
        hRenderConfig->roomAcoustics.dimensions = renderConfig.room_acoustics.dimensions;
        hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.room_acoustics.ListenerOrigin;
        hRenderConfig->roomAcoustics.use_er = renderConfig.roomAcoustics.use_er;
        hRenderConfig->roomAcoustics.lowComplexity = renderConfig.roomAcoustics.lowComplexity;
        hRenderConfig->roomAcoustics.dimensions = renderConfig.roomAcoustics.dimensions;
        hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.roomAcoustics.ListenerOrigin;

        mvr2r( renderConfig.room_acoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF );
        mvr2r( renderConfig.roomAcoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF );
    }

    mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX );
    mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX );
    mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );
    mvr2r( renderConfig.roomAcoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX );
    mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX );
    mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );

    mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS );

+2 −2
Original line number Diff line number Diff line
@@ -892,7 +892,7 @@ ivas_error ivas_binaural_reverb_open(
    REVERB_STRUCT_HANDLE *hReverbPr,                            /* i/o: binaural reverb handle                  */
    const int16_t numBins,                                      /* i  : number of CLDFB bins                    */
    const int16_t numCldfbSlotsPerFrame,                        /* i  : number of CLDFB slots per frame         */
    ivas_roomAcoustics_t *roomAcoustics,                        /* i/o: room acoustics parameters               */
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics,             /* i/o: room acoustics parameters               */
    const AUDIO_CONFIG output_config,                           /* i  : output audio configuration              */
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                           */
@@ -1076,7 +1076,7 @@ void ivas_reverb_calc_color_levels(
);

void ivas_reverb_prepare_cldfb_params(
    ivas_roomAcoustics_t *pInput_params,
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params,
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv,
    const AUDIO_CONFIG input_audio_config,
    const int16_t use_brir,
Loading