Commit 49c5a267 authored by Michael Kohnen's avatar Michael Kohnen

WIP

parents 94cbeead 0c1e39fe
......@@ -65,7 +65,7 @@ CVAAmbisonicsBinauralMixdownReproduction::CVAAmbisonicsBinauralMixdownReproducti
, m_pdsStreamFilter(nullptr)
, m_iListenerID(-1)
, m_pDefaultHRIR(nullptr)
, m_matYinv(nullptr)
, m_matYinv()
, m_orderMatrices()
, m_bBFormatIsInit(false)
, m_dTrackingDelaySeconds(0)
......@@ -657,21 +657,44 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
}
}
Eigen::MatrixXd matYinvRot = matRotation * m_matYinv;
double debugYinvRot[25][25];
for (int i = 0; i < 25; i++) {
for (int j = 0; j < 25; j++) {
debugYinvRot[i][j] = matYinvRot(i, j);
}
}
double debugYinv[25][25];
for (int i = 0; i < 25; i++) {
for (int j = 0; j < 25; j++) {
debugYinv[i][j] = m_matYinv(i, j); //matrix[zeilen][spalten]
}
}
int m, n;
int iCurrentOrder;
double dGain;
//gains
for (int i = 0; i < GetNumInputChannels(); i++){
iCurrentOrder = floor(sqrt(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
{
for (int k = 0; k < 25; k++){
SHLinear2DegreeOrder(k, m, n);
dGain += m_matYinv(k, j) * matRotation(i,k) * m_vdRemaxWeights[n];
}
m_pDecoderMatrixPatchBay->ConnectChannels(0, i, 0, j, dGain);
dGain = 0;
}
}
}
else if ((m_sRotationMode == "ViewUp") || (m_sRotationMode == "Quaternion")) {
else if ((m_sRotationMode == "ViewUp") || (m_sRotationMode == "Quaternion") || !m_bBFormatIsInit) {
double dAzimuth, dElevation;
......@@ -762,6 +785,9 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
pFilterChR->Release();
m_bBFormatIsInit = true;
m_pdsStreamFilter->pTrigger->trigger();
}
}
else {
......@@ -771,7 +797,7 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene(CVASceneState* pNewSt
m_pdsStreamFilter->pTrigger->trigger();
return;
}
......
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