Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITACTC
Commits
f7f0310f
Commit
f7f0310f
authored
Feb 01, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Linux compat
parent
ed64d04a
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
f7f0310f
...
...
@@ -67,6 +67,10 @@ else( )
add_definitions
(
-DITA_CTC_STATIC -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC
)
endif
(
)
if
(
NOT WIN32
)
add_definitions
(
-std=gnu++11
)
endif
(
)
# linker
add_library
(
ITACTC
${
ITACTCHeader
}
${
ITACTCSources
}
)
...
...
include/ITANCTC.h
View file @
f7f0310f
...
...
@@ -28,7 +28,7 @@
#include
<ITAAtomicPrimitives.h>
#include
<ITAFFT.h>
#include
<ITASampleFrame.h>
#include
<ITAStop
w
atch.h>
#include
<ITAStop
W
atch.h>
#include
<ITAHDFTSpectra.h>
#include
<VistaBase/VistaVector3D.h>
...
...
src/ITANCTC.cpp
View file @
f7f0310f
...
...
@@ -264,12 +264,12 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
for
(
int
i
=
0
;
i
<
(
*
pHRTF
)[
0
]
->
getSize
();
i
++
)
{
float
fMag
=
(
*
pHRTF
)[
0
]
->
calcMagnitude
(
i
);
(
*
pHRTF
)[
0
]
->
setMagnitudePreservePhase
(
i
,
std
::
pow
f
(
fMag
,
m_fWaveIncidenceAngleCompensationFactor
)
);
(
*
pHRTF
)[
0
]
->
setMagnitudePreservePhase
(
i
,
std
::
pow
(
fMag
,
m_fWaveIncidenceAngleCompensationFactor
)
);
}
// Compensate initial HRTF energy when WICK is used (left channel)
assert
(
fEnergy
>
0
);
float
fEnergyCompensation
=
std
::
pow
f
(
fEnergy
,
(
1
-
m_fWaveIncidenceAngleCompensationFactor
)
);
float
fEnergyCompensation
=
std
::
pow
(
fEnergy
,
(
1
-
m_fWaveIncidenceAngleCompensationFactor
)
);
(
*
pHRTF
)[
0
]
->
mul
(
fEnergyCompensation
);
...
...
@@ -280,12 +280,12 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
for
(
int
i
=
0
;
i
<
(
*
pHRTF
)[
1
]
->
getSize
();
i
++
)
{
float
fMag
=
(
*
pHRTF
)[
1
]
->
calcMagnitude
(
i
);
(
*
pHRTF
)[
1
]
->
setMagnitudePreservePhase
(
i
,
std
::
pow
f
(
fMag
,
m_fWaveIncidenceAngleCompensationFactor
)
);
(
*
pHRTF
)[
1
]
->
setMagnitudePreservePhase
(
i
,
std
::
pow
(
fMag
,
m_fWaveIncidenceAngleCompensationFactor
)
);
}
// Compensate initial HRTF energy when WICK is used (right channel)
assert
(
fEnergy
>
0
);
fEnergyCompensation
=
std
::
pow
f
(
fEnergy
,
(
1
-
m_fWaveIncidenceAngleCompensationFactor
)
);
fEnergyCompensation
=
std
::
pow
(
fEnergy
,
(
1
-
m_fWaveIncidenceAngleCompensationFactor
)
);
(
*
pHRTF
)[
1
]
->
mul
(
fEnergyCompensation
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment