aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/loaddef.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-24 22:06:01 -0700
committerChris Robinson <[email protected]>2019-03-24 22:06:01 -0700
commit6edfa6e6e0260910576e073288633cdbd3094503 (patch)
treeafaca4c5721f8a6880a23f1810cd939a1443cdf4 /utils/makemhr/loaddef.cpp
parentf392d9c138b733e44988eadf8f5d8fc5218f8d01 (diff)
Cleanup some unnecessary parameters
Diffstat (limited to 'utils/makemhr/loaddef.cpp')
-rw-r--r--utils/makemhr/loaddef.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp
index d4e8db27..904fdc00 100644
--- a/utils/makemhr/loaddef.cpp
+++ b/utils/makemhr/loaddef.cpp
@@ -1701,7 +1701,7 @@ static void AverageHrirMagnitude(const uint points, const uint n, const double *
}
// Process the list of sources in the data set definition.
-int ProcessSources(const HeadModelT model, TokenReaderT *tr, HrirDataT *hData)
+int ProcessSources(TokenReaderT *tr, HrirDataT *hData)
{
uint channels = (hData->mChannelType == CT_STEREO) ? 2 : 1;
hData->mHrirsBase.resize(channels * hData->mIrCount * hData->mIrSize);
@@ -1826,16 +1826,14 @@ int ProcessSources(const HeadModelT model, TokenReaderT *tr, HrirDataT *hData)
ExtractSofaHrir(sofa, si, 0, src.mOffset, hData->mIrPoints, hrir.data());
azd->mIrs[0] = &hrirs[hData->mIrSize * azd->mIndex];
- if(model == HM_DATASET)
- azd->mDelays[0] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0, azd->mDelays[0]);
+ azd->mDelays[0] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0, azd->mDelays[0]);
AverageHrirMagnitude(hData->mIrPoints, hData->mFftSize, hrir.data(), 1.0, azd->mIrs[0]);
if(src.mChannel == 1)
{
ExtractSofaHrir(sofa, si, 1, src.mOffset, hData->mIrPoints, hrir.data());
azd->mIrs[1] = &hrirs[hData->mIrSize * (hData->mIrCount + azd->mIndex)];
- if(model == HM_DATASET)
- azd->mDelays[1] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0, azd->mDelays[1]);
+ azd->mDelays[1] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0, azd->mDelays[1]);
AverageHrirMagnitude(hData->mIrPoints, hData->mFftSize, hrir.data(), 1.0, azd->mIrs[1]);
}
@@ -1893,8 +1891,7 @@ int ProcessSources(const HeadModelT model, TokenReaderT *tr, HrirDataT *hData)
}
}
azd->mIrs[ti] = &hrirs[hData->mIrSize * (ti * hData->mIrCount + azd->mIndex)];
- if(model == HM_DATASET)
- azd->mDelays[ti] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0 / factor[ti], azd->mDelays[ti]);
+ azd->mDelays[ti] = AverageHrirOnset(hData->mIrRate, hData->mIrPoints, hrir.data(), 1.0 / factor[ti], azd->mDelays[ti]);
AverageHrirMagnitude(hData->mIrPoints, hData->mFftSize, hrir.data(), 1.0 / factor[ti], azd->mIrs[ti]);
factor[ti] += 1.0;
if(!TrIsOperator(tr, "+"))