aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-12 05:11:53 -0700
committerChris Robinson <[email protected]>2012-09-12 05:11:53 -0700
commit38e7bd53590a6726f7dc5cc70ab92603aa8e2117 (patch)
tree77954b0c7cb9889ae059c5cf3f789dce942c5cbb /utils
parent613ce3f976ffac7d1bd0529d511d94dbf0f1d431 (diff)
Properly scale the HRTF delays when writing them
Diffstat (limited to 'utils')
-rw-r--r--utils/makehrtf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/makehrtf.c b/utils/makehrtf.c
index 5a3f7d1b..f6b16889 100644
--- a/utils/makehrtf.c
+++ b/utils/makehrtf.c
@@ -1777,8 +1777,7 @@ static int StoreMhr (const HrirDataT * hData, const char * filename) {
}
}
for (j = 0; j < hData -> mIrCount; j ++) {
-// v = (int) fmin (round (44100.0 * hData -> mHrtds [j]), MAX_HRTD);
- v = (int) fmin (hData -> mHrtds [j], MAX_HRTD);
+ v = (int) fmin (round (hData -> mIrRate * hData -> mHrtds [j]), MAX_HRTD);
if (! WriteBin4 (BO_LITTLE, 1, (uint4) v, fp, filename))
return (0);
}
@@ -1844,7 +1843,7 @@ static int StoreTable (const HrirDataT * hData, const char * filename) {
if (! WriteAscii (text, fp, filename))
return (0);
for (j = 0; j < hData -> mIrCount; j ++) {
- v = (int) fmin (round (44100.0 * hData -> mHrtds [j]), MAX_HRTD);
+ v = (int) fmin (round (hData -> mIrRate * hData -> mHrtds [j]), MAX_HRTD);
snprintf (text, 128, "%d, ", v);
if (! WriteAscii (text, fp, filename))
return (0);