¡@

Home 

2014/10/15 ¤U¤È 10:03:31

iphone Programming Glossary: afilename

How do you completely remove and release memory of an OpenAL sound file?

http://stackoverflow.com/questions/2035975/how-do-you-completely-remove-and-release-memory-of-an-openal-sound-file

current frame kill quit This is how I load the sounds void loadSoundWithKey NSString aSoundKey fileName NSString aFileName fileExt NSString aFileExt Check to make sure that a sound with the same key does not already exist NSNumber numVal soundLibrary.. data from the file which has been passed in CFURLRef fileURL CFURLRef NSURL fileURLWithPath bundle pathForResource aFileName ofType aFileExt retain if fileURL data MyGetOpenALAudioData fileURL size format freq CFRelease fileURL if error alGetError.. SoundManager Error attaching audio to buffer x n error else NSLog @ ERROR SoundManager Could not find file ' @. @' aFileName aFileExt data NULL Place the buffer ID into the sound library against aSoundKey soundLibrary setObject NSNumber numberWithUnsignedInt..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

semi colon at the end of a method definition is valid and a matter of style. UIImage imageFromMainBundleFile NSString aFileName NSString bundlePath NSBundle mainBundle bundlePath return UIImage imageWithContentsOfFile NSString stringWithFormat @ @.. NSBundle mainBundle bundlePath return UIImage imageWithContentsOfFile NSString stringWithFormat @ @ @ bundlePath aFileName Rincewind also included some example code to build your own optimised version. I can't see it is worth the maintentace but..