aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/loaddef.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-24 22:43:43 -0700
committerChris Robinson <[email protected]>2019-03-24 22:43:43 -0700
commit78aeca10c9913a9bf0a42cc86cf641006031b6ba (patch)
tree074e817097e2687baceb4966e0ca3e36d8691acd /utils/makemhr/loaddef.cpp
parent6edfa6e6e0260910576e073288633cdbd3094503 (diff)
Add a command-line option to force mono input with makemhr
Diffstat (limited to 'utils/makemhr/loaddef.cpp')
-rw-r--r--utils/makemhr/loaddef.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp
index 904fdc00..e26d0c5c 100644
--- a/utils/makemhr/loaddef.cpp
+++ b/utils/makemhr/loaddef.cpp
@@ -1181,7 +1181,7 @@ static ChannelTypeT MatchChannelType(const char *ident)
// Process the data set definition to read and validate the data set metrics.
-int ProcessMetrics(TokenReaderT *tr, const uint fftSize, const uint truncSize, HrirDataT *hData)
+int ProcessMetrics(TokenReaderT *tr, const uint fftSize, const uint truncSize, const ChannelModeT chanMode, HrirDataT *hData)
{
int hasRate = 0, hasType = 0, hasPoints = 0, hasRadius = 0;
int hasDistance = 0, hasAzimuths = 0;
@@ -1235,6 +1235,11 @@ int ProcessMetrics(TokenReaderT *tr, const uint fftSize, const uint truncSize, H
TrErrorAt(tr, line, col, "Expected a channel type.\n");
return 0;
}
+ else if(hData->mChannelType == CT_STEREO)
+ {
+ if(chanMode == CM_ForceMono)
+ hData->mChannelType = CT_MONO;
+ }
hasType = 1;
}
else if(strcasecmp(ident, "points") == 0)