Commit 8bd5d3f3 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

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

Revert "Changing API removing sweet spot widening factor and adding cross-talk cancellation factor and wave incidence angle factor (+ getter/setter)"

This reverts commit e4e8cca5.

Please use feature branch instead.
parent e4e8cca5
...@@ -119,8 +119,7 @@ public: ...@@ -119,8 +119,7 @@ public:
double dSampleRate; //!< Sampling rate double dSampleRate; //!< Sampling rate
float fSpeedOfSound; //!< Speed of sound, m/s float fSpeedOfSound; //!< Speed of sound, m/s
int iOptimization; //!< Optimization algorithm (future work, see features/room_compensation) int iOptimization; //!< Optimization algorithm (future work, see features/room_compensation)
float fCrossTalkCancellationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0) float fSweetSpotWideningFactor; //!< Factor for sweet spot widening (none = 0.0, max_wide = 1.0)
float fWaveIncidenceAngleCompensationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0)
class ITA_CTC_API Loudspeaker class ITA_CTC_API Loudspeaker
{ {
...@@ -176,29 +175,17 @@ public: ...@@ -176,29 +175,17 @@ public:
*/ */
void SetBeta( float fBeta ); void SetBeta( float fBeta );
//! Get cross-talk cancellation factor //! Get sweet spot widening factor
/** /**
* \return Factor [0..1] * \return Factor [0..1]
*/ */
float GetCrossTalkCancellationFactor(); float GetSweetSpotWideningFactor();
//! Set cross-talk cancellation factor //! Set sweet spot widening parameter
/** /**
* \param fFactor number between [0..1] (none: 0, max range = 1.0) * \param fFactor number between [0..1] (none: 0, max range = 1.0)
*/ */
void SetCrossTalkCancellationFactor( float fFactor ); void SetSweetSpotWideningFactor( 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 //! Get additional delay parameter
/** /**
...@@ -295,8 +282,7 @@ private: ...@@ -295,8 +282,7 @@ private:
std::atomic< float > m_fBeta; //!< Beta parameter (regularization) 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::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 <int > m_iOptimization; //!< Optimization (see Config enum)
std::atomic< float > m_fCrossTalkCancellationFactor; //!< Factor for cross-talk cancellation (none = 0.0, full = 1.0) std::atomic< float > m_fSweetSpotWideningFactor; //!< Factor for sweet spot widening (none = 0.0, max_wide = 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 const DAFFContentIR* m_pHRIR; //!< HRIR dataset pointer
Pose m_oHeadPose; //!< Current head Pose data Pose m_oHeadPose; //!< Current head Pose data
......
...@@ -23,8 +23,7 @@ ITANCTC::ITANCTC( const Config& oNCTCConfig ) ...@@ -23,8 +23,7 @@ ITANCTC::ITANCTC( const Config& oNCTCConfig )
m_fBeta = float( 1e-4 ); m_fBeta = float( 1e-4 );
m_iOptimization = m_oConfig.iOptimization; m_iOptimization = m_oConfig.iOptimization;
m_fCrossTalkCancellationFactor = m_oConfig.fCrossTalkCancellationFactor; m_fSweetSpotWideningFactor = m_oConfig.fSweetSpotWideningFactor;
m_fWaveIncidenceAngleCompensationFactor = m_oConfig.fWaveIncidenceAngleCompensationFactor;
m_oHeadPose.vPos.SetToZeroVector(); m_oHeadPose.vPos.SetToZeroVector();
m_oHeadPose.vView.SetValues( 0, 0, -1.0f ); m_oHeadPose.vView.SetValues( 0, 0, -1.0f );
...@@ -362,24 +361,14 @@ float ITANCTC::GetBeta() ...@@ -362,24 +361,14 @@ float ITANCTC::GetBeta()
return m_fBeta; return m_fBeta;
} }
void ITANCTC::SetCrossTalkCancellationFactor( float fFactor ) void ITANCTC::SetSweetSpotWideningFactor( float fFactor )
{ {
m_fCrossTalkCancellationFactor = fFactor; m_fSweetSpotWideningFactor = fFactor;
} }
float ITANCTC::GetCrossTalkCancellationFactor() float ITANCTC::GetSweetSpotWideningFactor()
{ {
return m_fCrossTalkCancellationFactor; return m_fSweetSpotWideningFactor;
}
void ITANCTC::SetWaveIncidenceAngleCompensationFactor( float fFactor )
{
m_fWaveIncidenceAngleCompensationFactor = fFactor;
}
float ITANCTC::GetWaveIncidenceAngleCompensation()
{
return m_fWaveIncidenceAngleCompensationFactor;
} }
void ITANCTC::SetDelayTime( float fDelayTime ) 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