Commit 2e653a20 authored by emerit's avatar emerit
Browse files

fix bug

parent 38f7cf52
Loading
Loading
Loading
Loading
+68 −54
Original line number Diff line number Diff line
@@ -879,6 +879,7 @@ int main(
        }
    }

#ifndef FIX_BINARY_BINAURAL_READING
    if ( !isEmptyString( args.customHrtfFilePath ) )
    {
        if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
@@ -887,6 +888,7 @@ int main(
            exit( -1 );
        }
    }
#endif

    if ( !isEmptyString( args.renderConfigFilePath ) )
    {
@@ -1016,13 +1018,21 @@ int main(
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
        exit( -1 );
    }
#endif    

#ifdef FIX_BINARY_BINAURAL_READING
    if ( !isEmptyString( args.customHrtfFilePath ) )
    {
        if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath );
            exit( -1 );
        }

        if ( hrtfFileReader != NULL )
        {
            if ( ( error = IVAS_REND_GetHrtfHandle( hIvasRend, &hHrtfTD ) ) != IVAS_ERR_OK )
@@ -1111,6 +1121,8 @@ int main(
                }
            }
        }
        hrtfFileReader_close( &hrtfFileReader );
    }
#endif


@@ -2210,7 +2222,9 @@ int main(
    RotationFileReader_close( &externalOrientationFileReader );
    RotationFileReader_close( &referenceRotReader );
    Vector3PairFileReader_close( &referenceVectorReader );
#ifndef FIX_BINARY_BINAURAL_READING
    hrtfFileReader_close( &hrtfFileReader );
#endif
#ifdef FIX_BINARY_BINAURAL_READING
    if ( hSetOfHRTF )
    {
+2 −2
Original line number Diff line number Diff line
@@ -256,13 +256,13 @@ def compare_renderer_args(

def compare_renderer_vs_renderer_with_binary_hrir(test_info, in_fmt, out_fmt, **kwargs):
    
    hrtf_file = "./scripts/binauralRenderer_Interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin"
    hrtf_file_path = SCRIPTS_DIR.joinpath("binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin")
    ref, ref_fs = run_renderer(
        in_fmt,
        out_fmt,
        test_case_name=test_info.node.name,
        output_path_base=OUTPUT_PATH_REF,
        hrtf_file = hrtf_file,
        hrtf_file = str(hrtf_file_path),
        **kwargs,
    )
    cut, cut_fs = run_renderer(