¡@

Home 

2014/10/15 ¤U¤È 10:14:20

iphone Programming Glossary: spike

Detecting a clap in IOS

http://stackoverflow.com/questions/11173605/detecting-a-clap-in-ios

a spectral analysis FFT of the input signal and then looking in a much narrower frequency band for a sharp signal spike similar to the part you already have. I haven't looked closely at this source but here's some possible open source FFT code.. frequency range you actually care about. In my own tests with some laptop software I have my claps have a very strong spike around 1kHz 2kHz. Possibly overkill for you needs but if you need something higher fidelity then I suspect you will not..

img_data_lock iphone - imageNamed vs imageWithContentsofFile

http://stackoverflow.com/questions/2907780/img-data-lock-iphone-imagenamed-vs-imagewithcontentsoffile

respond to memory warnings by purging their images and reloading it when needed which might explain why your memory spike went away. Also the cache seems to be much larger in simulator than in actual hardware the problems and crashes I've seen..

Releasing renderInContext result within a loop

http://stackoverflow.com/questions/4970627/releasing-renderincontext-result-within-a-loop

UIGraphicsBeginImageContext to UIGraphicsEndImageContext with UIImage image someotherimage then the memory does not spike but is allocated and reduces on every iteration of the loop as I would expect due to the Autorelease pool. It doesn't crash..