Loading scripts/binauralRenderer_interface/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ set(SOURCE_FILES_H # require to be bit exact with main branch if(MSVC) add_compile_options("/fp:strict") add_compile_options("/fp:precise") else() add_compile_options("-fno-fast-math") endif() Loading scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +5 −5 Original line number Diff line number Diff line Loading @@ -1067,9 +1067,9 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } t[1] = lscfg.ele[i]; /* elevation in deg */ t[2] = sofa_src_pos_val[2]; /* radius in m */ tc[0] = t[2] * cosf( t[0] * M_PI / 180. ) * cosf( t[1] * M_PI / 180. ); tc[1] = t[2] * sinf( t[0] * M_PI / 180. ) * cosf( t[1] * M_PI / 180. ); tc[2] = t[2] * sinf( t[1] * M_PI / 180. ); tc[0] = t[2] * cos( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); tc[1] = t[2] * sin( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); tc[2] = t[2] * sin( t[1] * M_PI / 180. ); nearest = find_pos_spheric( sofa_src_pos_cart_val, sofa_M, t ); if ( ( nearest >= 0 ) && ( nearest < sofa_M ) ) { Loading @@ -1085,8 +1085,8 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c ac[2] = sofa_src_pos_cart_val[nearest * 3 + 2]; } float prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrtf( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrtf( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); float cosAngleMin = cosf( PI_OVER_180 * MAX_DIFF_ANGLE ); double prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrt( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrt( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); double cosAngleMin = cos( PI_OVER_180 * MAX_DIFF_ANGLE ); if ( prodScal < cosAngleMin ) { mxDestroyArray( sofa ); Loading Loading
scripts/binauralRenderer_interface/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ set(SOURCE_FILES_H # require to be bit exact with main branch if(MSVC) add_compile_options("/fp:strict") add_compile_options("/fp:precise") else() add_compile_options("-fno-fast-math") endif() Loading
scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +5 −5 Original line number Diff line number Diff line Loading @@ -1067,9 +1067,9 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } t[1] = lscfg.ele[i]; /* elevation in deg */ t[2] = sofa_src_pos_val[2]; /* radius in m */ tc[0] = t[2] * cosf( t[0] * M_PI / 180. ) * cosf( t[1] * M_PI / 180. ); tc[1] = t[2] * sinf( t[0] * M_PI / 180. ) * cosf( t[1] * M_PI / 180. ); tc[2] = t[2] * sinf( t[1] * M_PI / 180. ); tc[0] = t[2] * cos( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); tc[1] = t[2] * sin( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); tc[2] = t[2] * sin( t[1] * M_PI / 180. ); nearest = find_pos_spheric( sofa_src_pos_cart_val, sofa_M, t ); if ( ( nearest >= 0 ) && ( nearest < sofa_M ) ) { Loading @@ -1085,8 +1085,8 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c ac[2] = sofa_src_pos_cart_val[nearest * 3 + 2]; } float prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrtf( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrtf( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); float cosAngleMin = cosf( PI_OVER_180 * MAX_DIFF_ANGLE ); double prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrt( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrt( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); double cosAngleMin = cos( PI_OVER_180 * MAX_DIFF_ANGLE ); if ( prodScal < cosAngleMin ) { mxDestroyArray( sofa ); Loading