Skip to content

Commit

Permalink
Bug fix in calculating the trajectory
Browse files Browse the repository at this point in the history
  • Loading branch information
petibub committed Jan 24, 2022
1 parent 39aa96a commit b609077
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NativeCode/Plugin_Spatializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// Please note that this will only work on Unity 5.2 or higher.

#define SOFALIZER_VERSION "1.4.1-dev" // SOFAlizer version
#define SOFALIZER_VERSION "1.4.1" // SOFAlizer version

#include "AudioPluginUtil.h"
#include "mysofa.h" // include libmysofa by, Copyright (c) 2016-2021, Symonics GmbH, Christian Hoene
Expand Down Expand Up @@ -403,7 +403,7 @@ namespace Spatializer

// Get the indicies to the nearest HRTF directions, interpolated between the old position and the new one
int nearest[16]{}, nidx = 0;
float pos[3], nmax = float(length) / HRTFLEN;
float pos[3], nmax = float(length) / (HRTFLEN * 2);
for (unsigned int sampleOffset = 0; sampleOffset < length; sampleOffset += HRTFLEN)
{
pos[0] = (t[0] - o[0]) / nmax*(nidx + 1) + o[0];
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ History:
Version 1.4.1
=============
* Debug 8 added to show the audio block size
* Bug fix in calculating the trajectory

Version 1.4.0
=============
Expand Down

0 comments on commit b609077

Please sign in to comment.