Commit 119f43a9 authored by Sebastian Riebeling's avatar Sebastian Riebeling

Change in BFormat rotation

parent f0e5f1b2
......@@ -67,6 +67,7 @@ CVAAmbisonicsBinauralMixdownReproduction::CVAAmbisonicsBinauralMixdownReproducti
, m_pDefaultHRIR(nullptr)
, m_matYinv(nullptr)
, m_orderMatrices()
, m_bBFormatIsInit(false)
, m_dTrackingDelaySeconds(0)
{
CVAConfigInterpreter conf(*(m_oParams.pConfig));
......@@ -585,7 +586,7 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
if (m_sRotationMode == "BFormat") {
if (m_sRotationMode == "BFormat" && m_bBFormatIsInit) {
//Calculate Rotation from Listener to Origin
//rotate ListenerUp to point Up in standard Up-Vector(0,1,0)
VistaQuaternion qUpToOrigin(vvListenerUp, vvStandardListenerUp);
......@@ -656,13 +657,15 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
}
}
Eigen::MatrixXd matYinvRot = matRotation * m_matYinv;
int iCurrentOrder;
//gains
for (int i = 0; i < GetNumInputChannels(); i++){
iCurrentOrder = floor(sqrt(i));
for (int j = 0; j < GetNumVirtualLoudspeaker(); j++)
{
double dGain = m_matYinv(i, j) * m_vdRemaxWeights[iCurrentOrder] * matRotation(i, j); //* gain abhngig von i; membervar
double dGain = m_matYinv(i, j) * m_vdRemaxWeights[iCurrentOrder];
m_pDecoderMatrixPatchBay->ConnectChannels(0, i, 0, j, dGain);
}
}
......@@ -759,6 +762,8 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
pFilterChL->Release();
pFilterChR->Release();
m_bBFormatIsInit = true;
}
}
else {
......
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