¡@

Home 

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

iphone Programming Glossary: soundmanager

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

level based iPhone app. I need to load and release sound files for each level. Everything works fine with my openAL SoundManager except releasing sounds. At first when I remove a sound it seems to do what it is meant to do it removes the sound and I.. numVal soundLibrary objectForKey aSoundKey If the key is found log it and finish if numVal nil NSLog @ WARNING SoundManager Sound key ' @' already exists. aSoundKey return NSUInteger bufferID Generate a buffer within OpenAL for this sound alGenBuffers.. data MyGetOpenALAudioData fileURL size format freq CFRelease fileURL if error alGetError AL_NO_ERROR NSLog @ ERROR SoundManager Error loading sound x n error exit 1 Use the static buffer data API alBufferDataStaticProc bufferID format data size freq..