This is error
Error
main.lua:20: size of C type is unknown or too large
Traceback
[love "callbacks.lua"]:228: in function 'handler'
main.lua:20: in function 'update'
[love "callbacks.lua"]:162: in function <[love "callbacks.lua"]:144>
[C]: in function 'xpcall'
It seems like there is an issue with my Fourier transform.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
It seems like there is an issue with my Fourier transform.
- Attachments
-
- main.lua
- (805 Bytes) Downloaded 120 times
::Hello::
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: It seems like there is an issue with my Fourier transform.
First of all, your file's character encoding is not utf-8, but GB2312, which it shouldn't be; fix that and keep to it if you don't want random unexplainable errors.
Second, love.sound.newSoundData can directly take a filename, you most definitely do not need to read in the data manually.
Third, the data you get in a SoundData is just phase information, that's not the same data an FFT will make for you... not to mention that it's infinitely simpler to just use SoundData:getSample anyway.
As for the error itself, i'm guessing that you need to actually cast the pointer to a C type for you to be able to index into it.
Second, love.sound.newSoundData can directly take a filename, you most definitely do not need to read in the data manually.
Third, the data you get in a SoundData is just phase information, that's not the same data an FFT will make for you... not to mention that it's infinitely simpler to just use SoundData:getSample anyway.
As for the error itself, i'm guessing that you need to actually cast the pointer to a C type for you to be able to index into it.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Bing [Bot] and 14 guests