Skip to content

Commit

Permalink
Fix bug in the LUT creation
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDiazGuerra authored Oct 2, 2019
1 parent 69199f4 commit 4ea0923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpuRIR_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ cudaTextureObject_t create_sinc_texture_lut(cudaArray **cuArrayLut, int Tw, int
// Create lut in host memory
int lut_center = lut_len / 2;
scalar_t* sinc_lut_host = (scalar_t*)malloc(sizeof(scalar_t) * lut_len);
for (int i=0; i<lut_center; i++) {
for (int i=0; i<=lut_center; i++) {
scalar_t x = (float)i / lut_oversamp;
scalar_t sinc = (x==0.0f)? 1.0f : sin(PI*x) / (PI*x);
scalar_t hann = 0.5f * (1.0f + cos(2.0f*PI*x/Tw));
Expand Down

0 comments on commit 4ea0923

Please sign in to comment.