Commit e4e8cca5 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Changing API removing sweet spot widening factor and adding cross-talk...

Changing API removing sweet spot widening factor and adding cross-talk cancellation factor and wave incidence angle factor (+ getter/setter)
parent 0ccc0807
......@@ -119,7 +119,8 @@ public:
double dSampleRate; //!< Sampling rate
float fSpeedOfSound; //!< Speed of sound, m/s
int iOptimization; //!< Optimization algorithm (future work, see features/room_compensation)
float fSweetSpotWideningFactor; //!< Factor for sweet spot widening (none = 0.0, max_wide = 1.0)
float fCrossTalkCancellationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0)
float fWaveIncidenceAngleCompensationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0)
class ITA_CTC_API Loudspeaker
{
......@@ -175,17 +176,29 @@ public:
*/
void SetBeta( float fBeta );
//! Get sweet spot widening factor
//! Get cross-talk cancellation factor
/**
* \return Factor [0..1]
*/
float GetSweetSpotWideningFactor();
float GetCrossTalkCancellationFactor();
//! Set sweet spot widening parameter
//! Set cross-talk cancellation factor
/**
* \param fFactor number between [0..1] (none: 0, max range = 1.0)
*/
void SetSweetSpotWideningFactor( float fFactor );
void SetCrossTalkCancellationFactor( float fFactor );
//! Get cross-talk cancellation factor
/**
* \return Factor [0..1]
*/
float GetWaveIncidenceAngleCompensation();
//! Set cross-talk cancellation factor
/**
* \param fFactor number between [0..1] (none: 0, max range = 1.0)
*/
void SetWaveIncidenceAngleCompensationFactor( float fFactor );
//! Get additional delay parameter
/**
......@@ -282,7 +295,8 @@ private:
std::atomic< float > m_fBeta; //!< Beta parameter (regularization)
std::vector< float > m_vfDelayTime; //!< Add a delay [seconds] to the resulting CTC filter (individual channels)
std::atomic <int > m_iOptimization; //!< Optimization (see Config enum)
std::atomic< float > m_fSweetSpotWideningFactor; //!< Factor for sweet spot widening (none = 0.0, max_wide = 1.0)
std::atomic< float > m_fCrossTalkCancellationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0)
std::atomic< float > m_fWaveIncidenceAngleCompensationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0)
const DAFFContentIR* m_pHRIR; //!< HRIR dataset pointer
Pose m_oHeadPose; //!< Current head Pose data
......
......@@ -23,7 +23,8 @@ ITANCTC::ITANCTC( const Config& oNCTCConfig )
m_fBeta = float( 1e-4 );
m_iOptimization = m_oConfig.iOptimization;
m_fSweetSpotWideningFactor = m_oConfig.fSweetSpotWideningFactor;
m_fCrossTalkCancellationFactor = m_oConfig.fCrossTalkCancellationFactor;
m_fWaveIncidenceAngleCompensationFactor = m_oConfig.fWaveIncidenceAngleCompensationFactor;
m_oHeadPose.vPos.SetToZeroVector();
m_oHeadPose.vView.SetValues( 0, 0, -1.0f );
......@@ -361,14 +362,24 @@ float ITANCTC::GetBeta()
return m_fBeta;
}
void ITANCTC::SetSweetSpotWideningFactor( float fFactor )
void ITANCTC::SetCrossTalkCancellationFactor( float fFactor )
{
m_fSweetSpotWideningFactor = fFactor;
m_fCrossTalkCancellationFactor = fFactor;
}
float ITANCTC::GetSweetSpotWideningFactor()
float ITANCTC::GetCrossTalkCancellationFactor()
{
return m_fSweetSpotWideningFactor;
return m_fCrossTalkCancellationFactor;
}
void ITANCTC::SetWaveIncidenceAngleCompensationFactor( float fFactor )
{
m_fWaveIncidenceAngleCompensationFactor = fFactor;
}
float ITANCTC::GetWaveIncidenceAngleCompensation()
{
return m_fWaveIncidenceAngleCompensationFactor;
}
void ITANCTC::SetDelayTime( float fDelayTime )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment