Since the WORLD library has a built-in FFT routine, I figured I could use it and cut down on the number of libraries that I was using.
I had trouble getting the IFFT code working, which was odd because it should have been trivial once the FFT code was running.
The root cause was with Godot's GDExtension interface. Godot uses Variants for its variables. When a int type was passed via the interface to the C function that used a double, Godot was setting it to a zero because apparently that was what was saved in the float field of the varient.
What it should have done was notice that it was an int and cast it to a double.
After many hours I eventually figured it out. I went to open a bug, but it looks like it's already been corrected as of two weeks ago.
That's the joy of using the bleeding edge release, I guess.
In any event, it looks like the WORLD FFT and IFFT is now working.
No comments:
Post a Comment