Loading lib_rend/ivas_objectRenderer.c +13 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,13 @@ ivas_error ivas_td_binaural_open_unwrap( DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; #ifdef CONF_DISTATT DistAtten.DistAttenModel = TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED; DistAtten.MaxDist = 15.75f; DistAtten.RefDist = 1.0f; DistAtten.RollOffFactor = 1.0f; #endif if ( ( error = TDREND_MIX_SRC_SetPos( pBinRendTd, nS, Pos ) ) != IVAS_ERR_OK ) { return error; Loading @@ -209,6 +216,12 @@ ivas_error ivas_td_binaural_open_unwrap( { return error; } #ifdef CONF_DISTATT if ( ( error = TDREND_MIX_SRC_SetDistAtten( pBinRendTd, nS, &DistAtten ) ) != IVAS_ERR_OK ) { return error; } #endif } } Loading lib_rend/ivas_objectRenderer_sources.c +2 −2 Original line number Diff line number Diff line Loading @@ -609,7 +609,7 @@ static float TDREND_SRC_SPATIAL_GetDistGain( { case TDREND_DIST_ATTEN_MODEL_INV_DIST: #ifdef CONF_DISTATT DistGain = powf( DistAtten_p->RefDist / ( Dist2 - DistAtten_p->RefDist ), DistAtten_p->RollOffFactor ); DistGain = powf( DistAtten_p->RefDist / Dist2, DistAtten_p->RollOffFactor ); #else DistGain = DistAtten_p->RefDist / ( DistAtten_p->RefDist + DistAtten_p->RollOffFactor * ( Dist2 - DistAtten_p->RefDist ) ); #endif Loading @@ -626,7 +626,7 @@ static float TDREND_SRC_SPATIAL_GetDistGain( Dist2 = DistAtten_p->MaxDist; } #ifdef CONF_DISTATT DistGain = powf( DistAtten_p->RefDist / ( Dist2 - DistAtten_p->RefDist ), DistAtten_p->RollOffFactor ); DistGain = powf( DistAtten_p->RefDist / Dist2, DistAtten_p->RollOffFactor ); #else DistGain = DistAtten_p->RefDist / ( DistAtten_p->RefDist + DistAtten_p->RollOffFactor * ( Dist2 - DistAtten_p->RefDist ) ); #endif Loading Loading
lib_rend/ivas_objectRenderer.c +13 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,13 @@ ivas_error ivas_td_binaural_open_unwrap( DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; #ifdef CONF_DISTATT DistAtten.DistAttenModel = TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED; DistAtten.MaxDist = 15.75f; DistAtten.RefDist = 1.0f; DistAtten.RollOffFactor = 1.0f; #endif if ( ( error = TDREND_MIX_SRC_SetPos( pBinRendTd, nS, Pos ) ) != IVAS_ERR_OK ) { return error; Loading @@ -209,6 +216,12 @@ ivas_error ivas_td_binaural_open_unwrap( { return error; } #ifdef CONF_DISTATT if ( ( error = TDREND_MIX_SRC_SetDistAtten( pBinRendTd, nS, &DistAtten ) ) != IVAS_ERR_OK ) { return error; } #endif } } Loading
lib_rend/ivas_objectRenderer_sources.c +2 −2 Original line number Diff line number Diff line Loading @@ -609,7 +609,7 @@ static float TDREND_SRC_SPATIAL_GetDistGain( { case TDREND_DIST_ATTEN_MODEL_INV_DIST: #ifdef CONF_DISTATT DistGain = powf( DistAtten_p->RefDist / ( Dist2 - DistAtten_p->RefDist ), DistAtten_p->RollOffFactor ); DistGain = powf( DistAtten_p->RefDist / Dist2, DistAtten_p->RollOffFactor ); #else DistGain = DistAtten_p->RefDist / ( DistAtten_p->RefDist + DistAtten_p->RollOffFactor * ( Dist2 - DistAtten_p->RefDist ) ); #endif Loading @@ -626,7 +626,7 @@ static float TDREND_SRC_SPATIAL_GetDistGain( Dist2 = DistAtten_p->MaxDist; } #ifdef CONF_DISTATT DistGain = powf( DistAtten_p->RefDist / ( Dist2 - DistAtten_p->RefDist ), DistAtten_p->RollOffFactor ); DistGain = powf( DistAtten_p->RefDist / Dist2, DistAtten_p->RollOffFactor ); #else DistGain = DistAtten_p->RefDist / ( DistAtten_p->RefDist + DistAtten_p->RollOffFactor * ( Dist2 - DistAtten_p->RefDist ) ); #endif Loading