Commit c037abeb authored by emerit's avatar emerit
Browse files

fix compiler option for windows

parent a78318fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()
+5 −5
Original line number Diff line number Diff line
@@ -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 ) )
            {
@@ -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 );