Hi all,

I’m new to this forum, so please forgive me for the errors that I will make… and for my bad english too!

I’m a Ph.D. student in computer science and I work mainly in the audio field (3d-audio and stuffs like that).

I just started a project related to my thesis and i a got a HUGE amount of problems.

I developed a very simple code based on CUFFT example. But… i think the example itself has some problems. By definition if u have X and Y as input signals whose length is let’s say Nx and Ny the convolution will be of length Nx+Ny-1 while in the example is something “strange” as the longest signal + half of the shortest. Maybe i’m missing something but… this is not as important as the fact that if i do fft then ifft on X with those examples i won’t get the same signal! Which is even worse!!!

So basically what i understood is that a problem related to a “scaling factor” that “seems” related to the size of the window. But i can’t figure out the problem.

I hereby attach here the source code that gives me trouble. I’m using libsndfile to handle audio files but, the core can be easily extracted and applied to any array. I rewrite the “size calculation” so now it is Xn+Yn-1.

I will really appreciate any kind of help.

I work under MacOsX 10.6.8 and i really wanna work under win 7 also but i can’t succeed…

Thank you very much for your kind cooperation.

Best regards, Murivan!