aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/loaddef.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/makemhr/loaddef.h')
-rw-r--r--utils/makemhr/loaddef.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/utils/makemhr/loaddef.h b/utils/makemhr/loaddef.h
index e69de29b..5e8c5313 100644
--- a/utils/makemhr/loaddef.h
+++ b/utils/makemhr/loaddef.h
@@ -0,0 +1,30 @@
+#ifndef LOADDEF_H
+#define LOADDEF_H
+
+#include <stdio.h>
+
+#include "makemhr.h"
+
+
+// Constants for accessing the token reader's ring buffer.
+#define TR_RING_BITS (16)
+#define TR_RING_SIZE (1 << TR_RING_BITS)
+#define TR_RING_MASK (TR_RING_SIZE - 1)
+
+
+// Token reader state for parsing the data set definition.
+struct TokenReaderT {
+ FILE *mFile;
+ const char *mName;
+ uint mLine;
+ uint mColumn;
+ char mRing[TR_RING_SIZE];
+ size_t mIn;
+ size_t mOut;
+};
+
+void TrSetup(FILE *fp, const char *filename, TokenReaderT *tr);
+int ProcessMetrics(TokenReaderT *tr, const uint fftSize, const uint truncSize, HrirDataT *hData);
+int ProcessSources(const HeadModelT model, TokenReaderT *tr, HrirDataT *hData);
+
+#endif /* LOADDEF_H */