Commit cd20e47f authored by vaclav's avatar vaclav
Browse files

review of 'error' function returns + formal aspects

parent 37b82a90
Loading
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -714,8 +714,8 @@ int main(
    {
#ifndef NONBE_FIX_BINARY_BINAURAL_READING
        IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL;
#endif

#endif
        if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -730,11 +730,13 @@ int main(
#ifdef FIX_OLD_BINARY_FORMAT
                hrtfFileReader_close( &hrtfReader );
                strcat( arg.hrtfFileName, "new" );

                if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                    goto cleanup;
                }

                if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
                {
                    if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
@@ -785,7 +787,7 @@ int main(
#endif

#ifndef NONBE_FIX_BINARY_BINAURAL_READING
        IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL;
        IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL;
#endif
        if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK )
        {
@@ -807,7 +809,7 @@ int main(
            }
        }
#else
        if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
        if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfFileName );
            goto cleanup;
@@ -960,7 +962,7 @@ cleanup:
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
        destroy_td_hrtf( hHrtfTD );
#else
        dealloc_HRTF_binary( *hHrtfTD );
        dealloc_HRTF_binary( hHrtfTD );
#endif

#ifndef NONBE_FIX_BINARY_BINAURAL_READING
@@ -970,7 +972,7 @@ cleanup:
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
        destroy_SetOfHRTF( hSetOfHRTF );
#else
        destroy_SetOfHRTF( *hSetOfHRTF );
        destroy_SetOfHRTF( hSetOfHRTF );
#endif
    }

+1 −1
Original line number Diff line number Diff line
@@ -887,8 +887,8 @@ int main(
            exit( -1 );
        }
    }
#endif

#endif
    if ( !isEmptyString( args.renderConfigFilePath ) )
    {
        if ( RenderConfigReader_open( args.renderConfigFilePath, &renderConfigReader ) != IVAS_ERR_OK )
+1 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ ivas_error TDREND_MIX_Init(
    {
        hBinRendererTd->HrFiltSet_p = *hHrtfTD;
    }

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    hBinRendererTd->pHrFiltSet_p = hHrtfTD;
#endif
+1 −0
Original line number Diff line number Diff line
@@ -742,6 +742,7 @@ void ivas_reverb_get_hrtf_set_properties(
#ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB
        }
#endif

        /* Computing 2 bins data for later interpolation */

        /* Zeroing before accumalation for average value computing */
+7 −9
Original line number Diff line number Diff line
@@ -1372,10 +1372,11 @@ static ivas_error setRendInputActiveIsm(
    void *input,
    const AUDIO_CONFIG inConfig,
    const IVAS_REND_InputId id,
    RENDER_CONFIG_DATA *hRendCfg
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    ,
    RENDER_CONFIG_DATA *hRendCfg,
    hrtf_handles *hrtfs
#else
    RENDER_CONFIG_DATA *hRendCfg
#endif
)
{
@@ -4044,9 +4045,8 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout(
        if ( ( error = initMcBinauralRendering( inputMc,
                                                inputMc->base.inConfig,
                                                hIvasRend->outputConfig,
                                                hIvasRend->hRendererConfig
                                                hIvasRend->hRendererConfig,
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                                                ,
                                                hIvasRend->hHrtfs.hSetOfHRTF,
#endif
                                                FALSE ) ) != IVAS_ERR_OK )
@@ -4891,9 +4891,8 @@ ivas_error IVAS_REND_SetHeadRotation(
            if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i],
                                                    hIvasRend->inputsMc[i].base.inConfig,
                                                    hIvasRend->outputConfig,
                                                    hIvasRend->hRendererConfig
                                                    hIvasRend->hRendererConfig,
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                                                    ,
                                                    hIvasRend->hHrtfs.hSetOfHRTF,
#endif
                                                    TRUE ) ) != IVAS_ERR_OK )
@@ -4959,9 +4958,8 @@ ivas_error IVAS_REND_DisableHeadRotation(
                if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i],
                                                        hIvasRend->inputsMc[i].base.inConfig,
                                                        hIvasRend->outputConfig,
                                                        hIvasRend->hRendererConfig
                                                        hIvasRend->hRendererConfig,
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                                                        ,
                                                        hIvasRend->hHrtfs.hSetOfHRTF,
#endif
                                                        TRUE ) ) != IVAS_ERR_OK )
Loading