tags:

views:

52

answers:

1

I import oourafft.h and oourafft.m class, but get strange error while ooura initialize.

OouraFFT * myFFT = [OouraFFT initForSignalsOfLength:1024 numberOfWindows:10];

OouraFFT may not respond to +initForSignalsOfLength: numberOfWindows

Messages without matching method signature will be assumed to return 'id' and accept argument - Warning

I think that it some kind of error import .h file

+3  A: 

You are trying to call class method which does not exist in OouraFFT - this method is instance method, so you need to allocate object at first.

You should do the following:

OouraFFT * myFFT = [[OouraFFT alloc] initForSignalsOfLength:1024 andNumWindows:10];

And don't forget that you own object after this, therefore you should release or autorelease in an appropriate place.

Dmitry
Already do it. The same error
Andrew_E
Double check with OouraFFT.h that you use the right method.I found in Google CodeSearch OouraFFT and there is only method- (id)initForSignalsOfLength:(int)numPoints andNumWindows:(int)numberOfWindowswhich means that you misspelled the last parameter - should be andNumWindows instead of numberOfWindows
Dmitry
http://github.com/alexbw/iPhoneFFT have mis code - Yes it work. OouraFFT * myFFT = [[OouraFFT alloc] initForSignalsOfLength:1024 andNumWindows:10];
Andrew_E